Skip to content

Commit

Permalink
feat: 외출중 상태 이름 버튼 색깔 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongHoonC committed Jul 19, 2023
1 parent 849a8eb commit 29bae22
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ fun ProgressBar.setRemainTimeProgressDrawableByState(state: TicketStateUiModel)
@BindingAdapter("ticketStateBackground")
fun Button.setTicketStateBackgroundByState(state: TicketStateUiModel) {
val colorRes = when (state) {
BEFORE_ENTRY, AWAY, EMPTY -> R.color.md_theme_light_primary
BEFORE_ENTRY, EMPTY -> R.color.md_theme_light_primary
AFTER_ENTRY -> R.color.md_theme_light_secondary
AWAY -> R.color.md_theme_light_tertiary
}
backgroundTintList = ResourcesCompat.getColorStateList(resources, colorRes, null)
}

0 comments on commit 29bae22

Please sign in to comment.