add rounded colors to online status buttons

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-02-24 23:51:53 +01:00
parent e1c706fe68
commit ec438b0a9d
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 16 additions and 12 deletions

View File

@ -358,19 +358,19 @@ class SetStatusDialogFragment :
clearTopStatus()
when (statusType) {
StatusType.ONLINE -> {
binding.onlineStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.onlineStatus.setCardBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
}
StatusType.AWAY -> {
binding.awayStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.awayStatus.setCardBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
}
StatusType.DND -> {
binding.dndStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.dndStatus.setCardBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
}
StatusType.INVISIBLE -> {
binding.invisibleStatus.setBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.invisibleStatus.setCardBackgroundColor(resources.getColor(R.color.colorPrimary))
binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
}
else -> Log.d(logTag, "unknown status")
@ -380,10 +380,10 @@ class SetStatusDialogFragment :
private fun clearTopStatus() {
context?.let {
val grey = it.resources.getColor(R.color.grey_200)
binding.onlineStatus.setBackgroundColor(grey)
binding.awayStatus.setBackgroundColor(grey)
binding.dndStatus.setBackgroundColor(grey)
binding.invisibleStatus.setBackgroundColor(grey)
binding.onlineStatus.setCardBackgroundColor(grey)
binding.awayStatus.setCardBackgroundColor(grey)
binding.dndStatus.setCardBackgroundColor(grey)
binding.invisibleStatus.setCardBackgroundColor(grey)
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))

View File

@ -62,7 +62,8 @@
android:layout_weight="1"
android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout
android:layout_width="match_parent"
@ -129,7 +130,8 @@
android:layout_weight="1"
android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout
android:layout_width="match_parent"
@ -205,7 +207,8 @@
android:layout_weight="1"
android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout
android:layout_width="match_parent"
@ -260,7 +263,8 @@
android:layout_weight="1"
android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp">
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout
android:layout_width="match_parent"