From 2d01a8c4d4bb19fbfd2de51afdc69067ec978c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 25 Mar 2021 12:59:42 +0100 Subject: [PATCH] [UI] Fix nightly badge background tint. --- app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt | 3 +++ app/src/main/res/layout/activity_szkolny.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt b/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt index de9b5f85..cdb9778f 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt @@ -317,6 +317,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope { } else -> b.nightlyText.isVisible = false } + if (b.nightlyText.isVisible) { + b.nightlyText.background.setTintColor(0xa0ff0000.toInt()) + } navLoading = true diff --git a/app/src/main/res/layout/activity_szkolny.xml b/app/src/main/res/layout/activity_szkolny.xml index bdb2a6e7..2b35b431 100644 --- a/app/src/main/res/layout/activity_szkolny.xml +++ b/app/src/main/res/layout/activity_szkolny.xml @@ -40,13 +40,13 @@ android:layout_marginHorizontal="48dp" android:layout_marginVertical="8dp" android:background="@drawable/bg_rounded_4dp" - android:backgroundTint="#a0ff0000" android:fontFamily="sans-serif-light" android:gravity="center" android:padding="4dp" android:textAllCaps="true" android:textSize="12sp" android:textStyle="bold" + tools:backgroundTint="#a0ff0000" tools:text="Nightly\n20200503" />