From 6defead2ce9fe73129c4fea7e2970920ea4419c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Jes=C3=BAs=20de=20la=20Fuente?= Date: Wed, 29 Mar 2023 17:39:25 +0000 Subject: [PATCH] Use M3 theme, switch to Material Dialogs - Add Monet dynamic colors on the app's `onCreate()` - Set parent in styles.xml to `Theme.Material3.DayNight.NoActionBar` - Use `MaterialAlertDialogBuilder` - In the About and About KDE fragments, it uses the M3 elevated style instead of outlines - In `edit_text_alert_dialog_view.xml`, it uses the default theme style instead of specifying the one from MaterialComponents - Added a todo in the settings fragment: Preference dialogs don't yet use the M3 style. It complements https://invent.kde.org/network/kdeconnect-android/-/merge_requests/273, though the way that merge request accomplishes color theming is the one from before the onCreate dynamics color method --- res/layout/activity_about_kde.xml | 8 -------- res/layout/edit_text_alert_dialog_view.xml | 6 ++---- res/layout/fragment_about.xml | 7 +------ res/values/styles.xml | 3 ++- .../kde/kdeconnect/UserInterface/AlertDialogFragment.java | 4 +++- .../kde/kdeconnect/UserInterface/SettingsFragment.java | 3 +++ src/org/kde/kdeconnect/UserInterface/ThemeUtil.java | 3 +++ 7 files changed, 14 insertions(+), 20 deletions(-) diff --git a/res/layout/activity_about_kde.xml b/res/layout/activity_about_kde.xml index 5995d5fa..e22b171e 100644 --- a/res/layout/activity_about_kde.xml +++ b/res/layout/activity_about_kde.xml @@ -42,9 +42,7 @@ android:layout_marginRight="12dp" android:layout_marginEnd="12dp" android:layout_marginBottom="12dp" - card_view:cardBackgroundColor="@color/card_stroke_color" card_view:cardCornerRadius="12dp" - card_view:cardElevation="5dp" card_view:cardUseCompatPadding="true"> + app:hintEnabled="false"> + android:inputType="text" /> diff --git a/res/layout/fragment_about.xml b/res/layout/fragment_about.xml index 8fcfe629..1674bd61 100644 --- a/res/layout/fragment_about.xml +++ b/res/layout/fragment_about.xml @@ -19,9 +19,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="12dp" - card_view:cardBackgroundColor="@color/card_stroke_color" - card_view:cardCornerRadius="12dp" - card_view:cardElevation="5dp" card_view:cardUseCompatPadding="true"> -