Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
likorn
/
vocabulary_notebook
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d0ab0e95
authored
Nov 21, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the drawerLayout width
parent
f984f623
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
.idea/caches/build_file_checksums.ser
app/build.gradle
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/MainActivity.kt
app/src/main/res/layout/activity_main.xml
app/src/main/res/layout/content_main.xml
.idea/caches/build_file_checksums.ser
View file @
d0ab0e95
No preview for this file type
app/build.gradle
View file @
d0ab0e95
...
...
@@ -10,8 +10,8 @@ android {
applicationId
"com.paktalin.vocabularynotebook"
minSdkVersion
15
targetSdkVersion
28
versionCode
3
versionName
"1.
2
"
versionCode
4
versionName
"1.
3
"
multiDexEnabled
true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables
{
...
...
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
View file @
d0ab0e95
...
...
@@ -18,12 +18,14 @@ class LogInActivity : AppCompatActivity() {
override
fun
onStart
()
{
super
.
onStart
()
if
(
mUserLoggedIn
())
{
startUserActivity
()
}
if
(
mUserLoggedIn
())
{
startUserActivity
()
}
}
fun
login
()
{
val
(
username
,
password
)
=
getUsernameAndPassword
()
if
(
fieldsNotEmpty
(
username
,
password
,
this
))
if
(
fieldsNotEmpty
(
username
,
password
,
this
))
{
addProgressBar
()
mLogIn
(
{
removeProgressBar
(
supportFragmentManager
)
},
...
...
@@ -31,6 +33,7 @@ class LogInActivity : AppCompatActivity() {
{
shortToast
(
this
@LogInActivity
,
getString
(
R
.
string
.
toast_auth_failed
))
},
username
,
password
)
}
}
private
fun
signUp
()
{
val
(
username
,
password
)
=
getUsernameAndPassword
()
...
...
@@ -51,5 +54,7 @@ class LogInActivity : AppCompatActivity() {
private
fun
getUsernameAndPassword
()
=
Pair
(
etUsername
!!
.
text
.
toString
(),
etPassword
!!
.
text
.
toString
())
companion
object
{
private
val
TAG
=
"VN/"
+
LogInActivity
::
class
.
simpleName
}
companion
object
{
private
val
TAG
=
"VN/"
+
LogInActivity
::
class
.
simpleName
}
}
\ No newline at end of file
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/MainActivity.kt
View file @
d0ab0e95
...
...
@@ -18,7 +18,7 @@ import com.paktalin.vocabularynotebook.Vocabulary.Companion.SORT_BY_TRANSLATION
import
com.paktalin.vocabularynotebook.Vocabulary.Companion.SORT_BY_WORD
import
com.paktalin.vocabularynotebook.ui.fragments.VocabularyFragment
import
com.paktalin.vocabularynotebook.utils.*
import
kotlinx.android.synthetic.main.content_main.
*
import
kotlinx.android.synthetic.main.content_main.
swipeRefresh
class
MainActivity
:
AppCompatActivity
()
{
...
...
app/src/main/res/layout/activity_main.xml
View file @
d0ab0e95
...
...
@@ -3,7 +3,7 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/drawerLayout"
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"match_parent"
tools:openDrawer=
"start"
android:background=
"@drawable/wood"
...
...
app/src/main/res/layout/content_main.xml
View file @
d0ab0e95
...
...
@@ -24,7 +24,7 @@
android:layout_marginStart=
"@dimen/small_margin"
android:layout_marginTop=
"@dimen/small_margin"
/>
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<android.support.v4.widget.SwipeRefreshLayout
android:id=
"@+id/swipeRefresh"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment