Commit 1e0d43e6 by Paktalin

cleaned UI (preparing for release)

parent 3e8eee92
package com.paktalin.vocabularynotebook.ui.activities package com.paktalin.vocabularynotebook.ui.activities
import android.annotation.SuppressLint
import android.support.v7.app.AppCompatActivity import android.support.v7.app.AppCompatActivity
import android.os.Bundle import android.os.Bundle
import android.util.Log import android.util.Log
...@@ -18,7 +17,6 @@ class LogInActivity : AppCompatActivity() { ...@@ -18,7 +17,6 @@ class LogInActivity : AppCompatActivity() {
setContentView(R.layout.activity_log_in) setContentView(R.layout.activity_log_in)
btnLogIn!!.setOnClickListener { login() } btnLogIn!!.setOnClickListener { login() }
btnSignUp!!.setOnClickListener { signUp() } btnSignUp!!.setOnClickListener { signUp() }
btnRandomUser!!.setOnClickListener { createRandomUser() }
} }
override fun onStart() { override fun onStart() {
...@@ -62,12 +60,5 @@ class LogInActivity : AppCompatActivity() { ...@@ -62,12 +60,5 @@ class LogInActivity : AppCompatActivity() {
private fun showToastFailure() { shortToast(this@LogInActivity, getString(R.string.toast_auth_failed)) } 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 } companion object { private val TAG = "VN/" + LogInActivity::class.simpleName }
} }
\ No newline at end of file
...@@ -70,23 +70,10 @@ ...@@ -70,23 +70,10 @@
android:layout_marginLeft="8dp" android:layout_marginLeft="8dp"
android:layout_marginRight="8dp" android:layout_marginRight="8dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:text="Sign Up" android:text="@string/sign_up"
app:layout_constraintBottom_toBottomOf="@+id/btnLogIn" app:layout_constraintBottom_toBottomOf="@+id/btnLogIn"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/btnLogIn" app:layout_constraintStart_toEndOf="@+id/btnLogIn"
app:layout_constraintTop_toTopOf="@+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> </android.support.constraint.ConstraintLayout>
\ No newline at end of file
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" /> app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout> </android.support.v4.widget.DrawerLayout>
...@@ -2,21 +2,11 @@ ...@@ -2,21 +2,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" <menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
tools:showIn="navigation_view"> 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"> <group android:checkableBehavior="single">
<item <item
android:id="@+id/logOut" android:id="@+id/logOut"
android:icon="@android:drawable/ic_lock_power_off" android:icon="@android:drawable/ic_lock_power_off"
android:title="Log out" /> android:title="@string/log_out" />
</group> </group>
</menu> </menu>
...@@ -23,4 +23,6 @@ ...@@ -23,4 +23,6 @@
<string name="toast_auth_failed">Authentication failed</string> <string name="toast_auth_failed">Authentication failed</string>
<string name="toast_new_word_fail">Couldn\'t add the word</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="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> </resources>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment