Commit e8a42e4a by Paktalin

Refactoring: email is substituted with username

parent 7bd71fc9
......@@ -49,7 +49,7 @@ class LogInActivity : AppCompatActivity() {
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 }
}
\ No newline at end of file
......@@ -10,7 +10,7 @@
android:background="@drawable/wood">
<android.support.constraint.ConstraintLayout
android:id="@+id/emailPasswordLayout"
android:id="@+id/usernamePasswordLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/sheet"
......@@ -23,16 +23,15 @@
android:layout_marginTop="?android:attr/actionBarSize">
<EditText
android:id="@+id/etEmail"
android:id="@+id/etUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/small_margin"
android:background="@android:color/transparent"
android:ems="10"
android:textSize="@dimen/text_size"
android:fontFamily="@font/neucha"
android:hint="@string/hint_email"
android:inputType="textEmailAddress"
app:fontFamily="@font/neucha"
android:hint="@string/hint_username"
android:paddingEnd="@dimen/small_padding"
android:paddingLeft="@dimen/small_padding"
android:paddingRight="@dimen/small_padding"
......@@ -45,13 +44,13 @@
app:layout_constraintVertical_chainStyle="packed" />
<ImageView
android:id="@+id/lineEmail"
android:id="@+id/lineUsername"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:src="@drawable/line"
app:layout_constraintLeft_toLeftOf="@+id/etEmail"
app:layout_constraintRight_toRightOf="@+id/etEmail"
app:layout_constraintTop_toBottomOf="@+id/etEmail"
app:layout_constraintLeft_toLeftOf="@+id/etUsername"
app:layout_constraintRight_toRightOf="@+id/etUsername"
app:layout_constraintTop_toBottomOf="@+id/etUsername"
tools:ignore="ContentDescription" />
<EditText
......@@ -63,7 +62,7 @@
android:background="@android:color/transparent"
android:textSize="@dimen/text_size"
android:ems="10"
android:fontFamily="@font/neucha"
app:fontFamily="@font/neucha"
android:hint="@string/hint_password"
android:inputType="textPassword"
android:paddingEnd="@dimen/small_padding"
......@@ -73,7 +72,7 @@
android:textColor="@color/text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/lineEmail" />
app:layout_constraintTop_toBottomOf="@+id/lineUsername" />
<ImageView
android:layout_width="0dp"
......@@ -95,14 +94,14 @@
android:layout_margin="@dimen/small_margin"
android:text="@string/log_in"
android:background="@android:color/transparent"
android:fontFamily="@font/neucha"
app:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size"
android:textColor="@color/sheet_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btnSignUp"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/emailPasswordLayout" />
app:layout_constraintTop_toBottomOf="@+id/usernamePasswordLayout" />
<Button
android:id="@+id/btnSignUp"
......@@ -114,7 +113,7 @@
android:layout_marginStart="8dp"
android:text="@string/sign_up"
android:background="@android:color/transparent"
android:fontFamily="@font/neucha"
app:fontFamily="@font/neucha"
android:textSize="@dimen/button_text_size"
android:textColor="@color/colorPrimary"
app:layout_constraintBottom_toBottomOf="@+id/btnLogIn"
......
......@@ -4,7 +4,7 @@
<string name="btn_save">Save</string>
<string name="btn_cancel">Cancel</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_translation">translation</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