From d3658804c638100f85ee2e4ece49e214f4b2adc3 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 8 Nov 2022 21:26:25 +0100 Subject: [PATCH] Switch to MaterialComponents themes --- app/ui/base/src/main/res/layout/toolbar.xml | 12 ++++---- .../k9/ui/messageview/MessageViewFragment.kt | 3 +- .../res/layout/activity_account_settings.xml | 3 +- .../src/main/res/layout/message_list_item.xml | 1 + app/ui/legacy/src/main/res/values/attrs.xml | 1 + app/ui/legacy/src/main/res/values/styles.xml | 12 ++++++++ app/ui/legacy/src/main/res/values/themes.xml | 30 +++++++++++++++---- 7 files changed, 46 insertions(+), 16 deletions(-) diff --git a/app/ui/base/src/main/res/layout/toolbar.xml b/app/ui/base/src/main/res/layout/toolbar.xml index f4a5a6d54..ae6fcb2b9 100644 --- a/app/ui/base/src/main/res/layout/toolbar.xml +++ b/app/ui/base/src/main/res/layout/toolbar.xml @@ -1,8 +1,6 @@ - \ No newline at end of file + diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt index e2d39f565..54fc76347 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt @@ -238,7 +238,8 @@ class MessageViewFragment : intArrayOf(R.attr.iconActionMarkAsRead) } - requireContext().withStyledAttributes(attrs = drawableAttr) { + val toolbarContext = requireActivity().findViewById(R.id.toolbar).context + toolbarContext.withStyledAttributes(attrs = drawableAttr) { menu.findItem(R.id.toggle_unread).icon = getDrawable(0) } } diff --git a/app/ui/legacy/src/main/res/layout/activity_account_settings.xml b/app/ui/legacy/src/main/res/layout/activity_account_settings.xml index 50494fbf3..e887c8dc6 100644 --- a/app/ui/legacy/src/main/res/layout/activity_account_settings.xml +++ b/app/ui/legacy/src/main/res/layout/activity_account_settings.xml @@ -8,10 +8,9 @@ + + diff --git a/app/ui/legacy/src/main/res/values/styles.xml b/app/ui/legacy/src/main/res/values/styles.xml index c49e4ac03..a0a8e425f 100644 --- a/app/ui/legacy/src/main/res/values/styles.xml +++ b/app/ui/legacy/src/main/res/values/styles.xml @@ -107,5 +107,17 @@ match_parent + + + + diff --git a/app/ui/legacy/src/main/res/values/themes.xml b/app/ui/legacy/src/main/res/values/themes.xml index e5356dbb3..9fd416197 100644 --- a/app/ui/legacy/src/main/res/values/themes.xml +++ b/app/ui/legacy/src/main/res/values/themes.xml @@ -6,17 +6,26 @@ -