Commit e8a42e4a by Paktalin

Refactoring: email is substituted with username

parent 7bd71fc9
...@@ -49,7 +49,7 @@ class LogInActivity : AppCompatActivity() { ...@@ -49,7 +49,7 @@ class LogInActivity : AppCompatActivity() {
com.paktalin.vocabularynotebook.utils.addProgressBar(supportFragmentManager, R.id.container_login) com.paktalin.vocabularynotebook.utils.addProgressBar(supportFragmentManager, R.id.container_login)
} }
private fun getUsernameAndPassword() = Pair(etEmail!!.text.toString(), etPassword!!.text.toString()) 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
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
android:background="@drawable/wood"> android:background="@drawable/wood">
<android.support.constraint.ConstraintLayout <android.support.constraint.ConstraintLayout
android:id="@+id/emailPasswordLayout" android:id="@+id/usernamePasswordLayout"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/sheet" android:background="@drawable/sheet"
...@@ -23,16 +23,15 @@ ...@@ -23,16 +23,15 @@
android:layout_marginTop="?android:attr/actionBarSize"> android:layout_marginTop="?android:attr/actionBarSize">
<EditText <EditText
android:id="@+id/etEmail" android:id="@+id/etUsername"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/small_margin" android:layout_margin="@dimen/small_margin"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:ems="10" android:ems="10"
android:textSize="@dimen/text_size" android:textSize="@dimen/text_size"
android:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:hint="@string/hint_email" android:hint="@string/hint_username"
android:inputType="textEmailAddress"
android:paddingEnd="@dimen/small_padding" android:paddingEnd="@dimen/small_padding"
android:paddingLeft="@dimen/small_padding" android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding" android:paddingRight="@dimen/small_padding"
...@@ -45,13 +44,13 @@ ...@@ -45,13 +44,13 @@
app:layout_constraintVertical_chainStyle="packed" /> app:layout_constraintVertical_chainStyle="packed" />
<ImageView <ImageView
android:id="@+id/lineEmail" android:id="@+id/lineUsername"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/line" android:src="@drawable/line"
app:layout_constraintLeft_toLeftOf="@+id/etEmail" app:layout_constraintLeft_toLeftOf="@+id/etUsername"
app:layout_constraintRight_toRightOf="@+id/etEmail" app:layout_constraintRight_toRightOf="@+id/etUsername"
app:layout_constraintTop_toBottomOf="@+id/etEmail" app:layout_constraintTop_toBottomOf="@+id/etUsername"
tools:ignore="ContentDescription" /> tools:ignore="ContentDescription" />
<EditText <EditText
...@@ -63,7 +62,7 @@ ...@@ -63,7 +62,7 @@
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:textSize="@dimen/text_size" android:textSize="@dimen/text_size"
android:ems="10" android:ems="10"
android:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:hint="@string/hint_password" android:hint="@string/hint_password"
android:inputType="textPassword" android:inputType="textPassword"
android:paddingEnd="@dimen/small_padding" android:paddingEnd="@dimen/small_padding"
...@@ -73,7 +72,7 @@ ...@@ -73,7 +72,7 @@
android:textColor="@color/text_color" android:textColor="@color/text_color"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lineEmail" /> app:layout_constraintTop_toBottomOf="@+id/lineUsername" />
<ImageView <ImageView
android:layout_width="0dp" android:layout_width="0dp"
...@@ -95,14 +94,14 @@ ...@@ -95,14 +94,14 @@
android:layout_margin="@dimen/small_margin" android:layout_margin="@dimen/small_margin"
android:text="@string/log_in" android:text="@string/log_in"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size" android:textSize="@dimen/button_text_size"
android:textColor="@color/sheet_color" android:textColor="@color/sheet_color"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btnSignUp" app:layout_constraintEnd_toStartOf="@id/btnSignUp"
app:layout_constraintHorizontal_chainStyle="packed" app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/emailPasswordLayout" /> app:layout_constraintTop_toBottomOf="@+id/usernamePasswordLayout" />
<Button <Button
android:id="@+id/btnSignUp" android:id="@+id/btnSignUp"
...@@ -114,7 +113,7 @@ ...@@ -114,7 +113,7 @@
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:text="@string/sign_up" android:text="@string/sign_up"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:fontFamily="@font/neucha" app:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size" android:textSize="@dimen/button_text_size"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="@+id/btnLogIn" app:layout_constraintBottom_toBottomOf="@+id/btnLogIn"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<string name="btn_save">Save</string> <string name="btn_save">Save</string>
<string name="btn_cancel">Cancel</string> <string name="btn_cancel">Cancel</string>
<string name="hint_password">Password</string> <string name="hint_password">Password</string>
<string name="hint_email">Email</string> <string name="hint_username">Email or username</string>
<string name="hint_word">word</string> <string name="hint_word">word</string>
<string name="hint_translation">translation</string> <string name="hint_translation">translation</string>
<string name="menu_option_delete">Delete</string> <string name="menu_option_delete">Delete</string>
......
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