From 347b5efcd05459f922faa3b5618bc9bb1390ce8c Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Fri, 20 May 2022 14:24:06 +0530 Subject: [PATCH] Fix widget background in dark mode --- .../main/java/com/moez/QKSMS/feature/widget/WidgetAdapter.kt | 2 +- presentation/src/main/res/layout/widget.xml | 2 +- presentation/src/main/res/layout/widget_list_item.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/widget/WidgetAdapter.kt b/presentation/src/main/java/com/moez/QKSMS/feature/widget/WidgetAdapter.kt index 608b41625..9f9f9edf5 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/widget/WidgetAdapter.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/widget/WidgetAdapter.kt @@ -120,7 +120,7 @@ class WidgetAdapter(intent: Intent) : RemoteViewsService.RemoteViewsFactory { remoteViews.setInt(R.id.avatar, "setBackgroundColor", theme.theme) remoteViews.setTextColor(R.id.initial, theme.textPrimary) remoteViews.setInt(R.id.icon, "setColorFilter", theme.textPrimary) - remoteViews.setInt(R.id.avatarMask, "setColorFilter", background) + remoteViews.setInt(R.id.avatarMask, "setColorFilter", context.getColor(R.color.backgroundDark)) val contact = conversation.recipients.map { recipient -> recipient.contact ?: Contact().apply { numbers.add(PhoneNumber().apply { address = recipient.address }) } diff --git a/presentation/src/main/res/layout/widget.xml b/presentation/src/main/res/layout/widget.xml index 408d92156..5e99fa8f7 100644 --- a/presentation/src/main/res/layout/widget.xml +++ b/presentation/src/main/res/layout/widget.xml @@ -84,6 +84,6 @@ android:layout_width="match_parent" android:layout_height="8dp" android:layout_below="@id/toolbar" - android:background="@drawable/ab_shadow" /> + android:background="@color/backgroundDark" /> diff --git a/presentation/src/main/res/layout/widget_list_item.xml b/presentation/src/main/res/layout/widget_list_item.xml index 2cdaf088a..53a33a35a 100755 --- a/presentation/src/main/res/layout/widget_list_item.xml +++ b/presentation/src/main/res/layout/widget_list_item.xml @@ -23,7 +23,7 @@ android:id="@+id/conversation" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:background="@drawable/ripple" + android:background="@color/backgroundDark" android:gravity="center_vertical|start" android:orientation="horizontal" android:paddingLeft="16dp" -- GitLab