Browse Source

add rounded colors to online status buttons

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 3 years ago
parent
commit
ec438b0a9d

+ 8 - 8
app/src/main/java/com/nextcloud/talk/ui/dialog/SetStatusDialogFragment.kt

@@ -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.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.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))

+ 8 - 4
app/src/main/res/layout/dialog_set_status.xml

@@ -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"