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
1e0d43e6
authored
Nov 13, 2018
by
Paktalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned UI (preparing for release)
parent
3e8eee92
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
37 deletions
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
app/src/main/res/layout/activity_log_in.xml
app/src/main/res/layout/activity_main.xml
app/src/main/res/menu/activity_main_drawer.xml
app/src/main/res/values/strings.xml
app/src/main/java/com/paktalin/vocabularynotebook/ui/activities/LogInActivity.kt
View file @
1e0d43e6
package
com.paktalin.vocabularynotebook.ui.activities
import
android.annotation.SuppressLint
import
android.support.v7.app.AppCompatActivity
import
android.os.Bundle
import
android.util.Log
...
...
@@ -18,7 +17,6 @@ class LogInActivity : AppCompatActivity() {
setContentView
(
R
.
layout
.
activity_log_in
)
btnLogIn
!!
.
setOnClickListener
{
login
()
}
btnSignUp
!!
.
setOnClickListener
{
signUp
()
}
btnRandomUser
!!
.
setOnClickListener
{
createRandomUser
()
}
}
override
fun
onStart
()
{
...
...
@@ -62,12 +60,5 @@ class LogInActivity : AppCompatActivity() {
private
fun
showToastFailure
()
{
shortToast
(
this
@LogInActivity
,
getString
(
R
.
string
.
toast_auth_failed
))
}
@SuppressLint
(
"SetTextI18n"
)
private
fun
createRandomUser
()
{
etEmail
.
setText
(
"random@gmail.com"
)
etPassword
.
setText
(
"123456"
)
processUser
{
mSignUp
(
this
@LogInActivity
,
email
!!
,
password
!!
)
}
}
companion
object
{
private
val
TAG
=
"VN/"
+
LogInActivity
::
class
.
simpleName
}
}
\ No newline at end of file
app/src/main/res/layout/activity_log_in.xml
View file @
1e0d43e6
...
...
@@ -70,23 +70,10 @@
android:layout_marginLeft=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_marginStart=
"8dp"
android:text=
"
Sign U
p"
android:text=
"
@string/sign_u
p"
app:layout_constraintBottom_toBottomOf=
"@+id/btnLogIn"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/btnLogIn"
app:layout_constraintTop_toTopOf=
"@+id/btnLogIn"
/>
<Button
android:id=
"@+id/btnRandomUser"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"8dp"
android:layout_marginLeft=
"8dp"
android:layout_marginRight=
"8dp"
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"8dp"
android:text=
"Create random user"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_main.xml
View file @
1e0d43e6
...
...
@@ -22,7 +22,6 @@
android:layout_height=
"match_parent"
android:layout_gravity=
"start"
android:fitsSystemWindows=
"true"
app:headerLayout=
"@layout/nav_header_main"
app:menu=
"@menu/activity_main_drawer"
/>
</android.support.v4.widget.DrawerLayout>
app/src/main/res/menu/activity_main_drawer.xml
View file @
1e0d43e6
...
...
@@ -2,21 +2,11 @@
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
tools:showIn=
"navigation_view"
>
<item
android:title=
"Account"
>
<menu>
<item
android:id=
"@+id/settings"
android:icon=
"@drawable/common_google_signin_btn_icon_light"
android:title=
"Settings"
/>
</menu>
</item>
<group
android:checkableBehavior=
"single"
>
<item
android:id=
"@+id/logOut"
android:icon=
"@android:drawable/ic_lock_power_off"
android:title=
"
Log
out"
/>
android:title=
"
@string/log_
out"
/>
</group>
</menu>
app/src/main/res/values/strings.xml
View file @
1e0d43e6
...
...
@@ -23,4 +23,6 @@
<string
name=
"toast_auth_failed"
>
Authentication failed
</string>
<string
name=
"toast_new_word_fail"
>
Couldn\'t add the word
</string>
<string
name=
"toast_update_word_failed"
>
Couldn\'t update the word
</string>
<string
name=
"log_out"
>
Log out
</string>
<string
name=
"sign_up"
>
Sign Up
</string>
</resources>
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