Skip to content

Commit

Permalink
로그인, 메인 ui 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mkw8263 committed Mar 31, 2019
1 parent 254fe37 commit 0d6f6d5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MainActivity : DDDActivity<ActivityMainBinding, MainViewModel>() {
}

private fun btnAdminBackground(isAdmin: Boolean) {
val background = if (isAdmin) R.drawable.login_btn_impossible else R.drawable.login_btn_possible_admin
val background = if (isAdmin) R.drawable.login_btn_possible_admin else R.drawable.login_btn_impossible
btnAdminAttendance.background = ContextCompat.getDrawable(this, background)
}

Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="80dp"
android:textStyle="bold"
android:layout_marginBottom="16dp"
android:text="@string/login_special_title"
android:textColor="@color/login_special_title"
Expand Down Expand Up @@ -67,11 +68,13 @@
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/editID"
android:maxLines="1"
android:layout_width="match_parent"
android:onTextChanged="@{(text, start, before, count) -> loginViewModel.onIDTextChanged(text)}"
android:text="@={loginViewModel.editID}"
android:layout_height="wrap_content"
android:textSize="12dp"
android:inputType="text"
tools:ignore="SpUsage"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
Expand All @@ -93,6 +96,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12dp"
android:inputType="textPassword"
android:maxLines="1"
tools:ignore="SpUsage"/>
</com.google.android.material.textfield.TextInputLayout>

Expand All @@ -105,6 +110,8 @@
android:enabled="@{safeUnbox(loginViewModel.btnEnableLogin)? true : false}"
android:onClick="@{()->loginViewModel.login()}"
android:text="@string/login"
android:shadowColor="#4c000000"
android:shadowRadius="50"
android:textColor="@android:color/white"
android:textSize="16dp"
app:layout_constraintTop_toBottomOf="@+id/editPWLayout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
android:visibility="@{safeUnbox(mainViewModel.isAdmin)? View.VISIBLE : View.INVISIBLE}"
android:onClick="@{()->mainViewModel.attendance()}"
android:text="@{safeUnbox(mainViewModel.isAttendanceStart)? @string/attendance_end : @string/attendance_start}"
android:textColor="@{safeUnbox(mainViewModel.isAttendanceStart)? @color/white : @color/black}"
android:textColor="@{safeUnbox(mainViewModel.isAttendanceStart)? @color/black : @color/white}"
android:textSize="12dp"
app:layout_constraintBottom_toBottomOf="parent"
tools:ignore="SpUsage"/>
Expand Down

0 comments on commit 0d6f6d5

Please sign in to comment.