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() clearTopStatus()
when (statusType) { when (statusType) {
StatusType.ONLINE -> { 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)) binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.AWAY -> { 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)) binding.awayHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.DND -> { 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)) binding.dndHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
StatusType.INVISIBLE -> { 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)) binding.invisibleHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text_dark_background))
} }
else -> Log.d(logTag, "unknown status") else -> Log.d(logTag, "unknown status")
@ -380,10 +380,10 @@ class SetStatusDialogFragment :
private fun clearTopStatus() { private fun clearTopStatus() {
context?.let { context?.let {
val grey = it.resources.getColor(R.color.grey_200) val grey = it.resources.getColor(R.color.grey_200)
binding.onlineStatus.setBackgroundColor(grey) binding.onlineStatus.setCardBackgroundColor(grey)
binding.awayStatus.setBackgroundColor(grey) binding.awayStatus.setCardBackgroundColor(grey)
binding.dndStatus.setBackgroundColor(grey) binding.dndStatus.setCardBackgroundColor(grey)
binding.invisibleStatus.setBackgroundColor(grey) binding.invisibleStatus.setCardBackgroundColor(grey)
binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text)) binding.onlineHeadline.setTextColor(resources.getColor(R.color.high_emphasis_text))
binding.awayHeadline.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:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200" app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp"> app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -129,7 +130,8 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200" app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp"> app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -205,7 +207,8 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200" app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp"> app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -260,7 +263,8 @@
android:layout_weight="1" android:layout_weight="1"
android:orientation="horizontal" android:orientation="horizontal"
app:cardBackgroundColor="@color/grey_200" app:cardBackgroundColor="@color/grey_200"
app:cardElevation="0dp"> app:cardElevation="0dp"
app:cardCornerRadius="@dimen/button_corner_radius">
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"