diff options
| author | Charles Lombardo <clombardo169@gmail.com> | 2022-03-23 12:41:21 -0400 |
|---|---|---|
| committer | Charles Lombardo <clombardo169@gmail.com> | 2022-03-26 10:16:17 -0400 |
| commit | fde39b455c438c6310c55ae9e4476757bc47e116 (patch) | |
| tree | f99d47c707dea694ce3417a84c781ab1169349e4 /Source/Android/app/src | |
| parent | 1a5a52c00c9a0c9fbfc836d988d7b28bb7eb7cfc (diff) | |
Begin style migration to Material3
Use large card view rounded corner guidelines
Fix action bar theming
Needed to import android back button clip art to fix material 3 theming issue. The DolphinSettingsBase style used to inherit from the Theme.MaterialComponents.DayNight.DarkActionBar theme which would provide the light text and icons but this is no longer available with Material 3.
Fit box art more snugly in CardView
Change card height to match cover art
Add padding to top of games list recyclerview
Diffstat (limited to 'Source/Android/app/src')
| -rw-r--r-- | Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml | 12 | ||||
| -rw-r--r-- | Source/Android/app/src/main/res/drawable-hdpi/ic_back.png | bin | 0 -> 181 bytes | |||
| -rw-r--r-- | Source/Android/app/src/main/res/drawable-mdpi/ic_back.png | bin | 0 -> 142 bytes | |||
| -rw-r--r-- | Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png | bin | 0 -> 203 bytes | |||
| -rw-r--r-- | Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png | bin | 0 -> 306 bytes | |||
| -rw-r--r-- | Source/Android/app/src/main/res/layout/card_game.xml | 18 | ||||
| -rw-r--r-- | Source/Android/app/src/main/res/layout/fragment_grid.xml | 3 | ||||
| -rw-r--r-- | Source/Android/app/src/main/res/values/styles.xml | 16 |
8 files changed, 33 insertions, 16 deletions
diff --git a/Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml b/Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml new file mode 100644 index 0000000000..e15be555e1 --- /dev/null +++ b/Source/Android/app/src/main/res/drawable-anydpi/ic_back.xml @@ -0,0 +1,12 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="#FFFFFF" + android:alpha="1" + android:autoMirrored="true"> + <path + android:fillColor="@android:color/white" + android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/> +</vector> diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_back.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_back.png Binary files differnew file mode 100644 index 0000000000..dd4ead3bf4 --- /dev/null +++ b/Source/Android/app/src/main/res/drawable-hdpi/ic_back.png diff --git a/Source/Android/app/src/main/res/drawable-mdpi/ic_back.png b/Source/Android/app/src/main/res/drawable-mdpi/ic_back.png Binary files differnew file mode 100644 index 0000000000..c0848a19a4 --- /dev/null +++ b/Source/Android/app/src/main/res/drawable-mdpi/ic_back.png diff --git a/Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png b/Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png Binary files differnew file mode 100644 index 0000000000..0bd2469c1c --- /dev/null +++ b/Source/Android/app/src/main/res/drawable-xhdpi/ic_back.png diff --git a/Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png Binary files differnew file mode 100644 index 0000000000..8316057723 --- /dev/null +++ b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_back.png diff --git a/Source/Android/app/src/main/res/layout/card_game.xml b/Source/Android/app/src/main/res/layout/card_game.xml index 777a597e0c..84e0cf503b 100644 --- a/Source/Android/app/src/main/res/layout/card_game.xml +++ b/Source/Android/app/src/main/res/layout/card_game.xml @@ -1,13 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - tools:layout_width="160dp" - android:layout_height="270dp" - android:transitionName="card_game" - android:focusable="true" - android:clickable="true" - android:foreground="?android:attr/selectableItemBackground"> + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:layout_width="160dp" + android:layout_height="249dp" + android:transitionName="card_game" + android:focusable="true" + android:clickable="true" + android:foreground="?android:attr/selectableItemBackground" + app:cardCornerRadius="8dp"> <LinearLayout android:layout_width="match_parent" diff --git a/Source/Android/app/src/main/res/layout/fragment_grid.xml b/Source/Android/app/src/main/res/layout/fragment_grid.xml index adedbed4c0..976839ff1f 100644 --- a/Source/Android/app/src/main/res/layout/fragment_grid.xml +++ b/Source/Android/app/src/main/res/layout/fragment_grid.xml @@ -15,7 +15,8 @@ android:id="@+id/grid_games" android:layout_width="match_parent" android:layout_height="match_parent" - tools:listitem="@layout/card_game"/> + tools:listitem="@layout/card_game" + android:paddingTop="8dp"/> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> diff --git a/Source/Android/app/src/main/res/values/styles.xml b/Source/Android/app/src/main/res/values/styles.xml index faa9fcf033..161afa826f 100644 --- a/Source/Android/app/src/main/res/values/styles.xml +++ b/Source/Android/app/src/main/res/values/styles.xml @@ -2,7 +2,7 @@ <resources> <!-- Inherit from the material theme --> - <style name="DolphinBase" parent="Theme.MaterialComponents.DayNight.NoActionBar"> + <style name="DolphinBase" parent="Theme.Material3.DayNight.NoActionBar"> <!-- Main theme colors --> <!-- Branding color for the app bar --> <item name="colorSurface">@color/dolphin_blue</item> @@ -19,21 +19,23 @@ </style> <!-- Same as above, but use default action bar, and mandate margins. --> - <style name="DolphinSettingsBase" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <style name="DolphinSettingsBase" parent="Theme.Material3.DayNight"> <item name="colorSurface">@color/dolphin_blue</item> <item name="colorPrimary">@color/dolphin_blue</item> <item name="colorPrimaryDark">@color/dolphin_blue</item> <item name="colorAccent">@color/dolphin_blue_secondary</item> + <item name="titleTextColor">@android:color/white</item> + <item name="homeAsUpIndicator">@drawable/ic_back</item> </style> <!-- Themes for Dialogs --> - <style name="DolphinDialogBase" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> + <style name="DolphinDialogBase" parent="Theme.Material3.DayNight.Dialog.Alert"> <item name="colorPrimary">@color/dolphin_blue</item> <item name="colorAccent">@color/dolphin_blue_secondary</item> </style> - <style name="DolphinEmulationBase" parent="Theme.MaterialComponents.DayNight.NoActionBar"> + <style name="DolphinEmulationBase" parent="Theme.Material3.DayNight.NoActionBar"> <item name="colorPrimary">@color/dolphin_blue</item> <item name="colorPrimaryDark">@color/dolphin_blue</item> <item name="colorAccent">@color/dolphin_blue_secondary</item> @@ -68,7 +70,7 @@ <item name="browseTitleViewLayout">@layout/titleview</item> </style> - <style name="InGameMenuOption" parent="Widget.MaterialComponents.Button.TextButton"> + <style name="InGameMenuOption" parent="Widget.Material3.Button.TextButton"> <item name="android:textSize">16sp</item> <item name="android:fontFamily">sans-serif-condensed</item> <item name="android:textColor">@android:color/white</item> @@ -102,10 +104,10 @@ <!-- If you want to set a specific toolbar theme, do it here --> - <item name="nnf_toolbarTheme">@style/ThemeOverlay.MaterialComponents.Dark.ActionBar</item> + <item name="nnf_toolbarTheme">@style/ThemeOverlay.Material3.Dark.ActionBar</item> </style> - <style name="FilePickerAlertDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> + <style name="FilePickerAlertDialogTheme" parent="Theme.Material3.DayNight.Dialog.Alert"> <item name="colorSurface">@color/dolphin_blue</item> <item name="colorPrimary">@color/dolphin_blue</item> <item name="colorPrimaryDark">@color/dolphin_blue</item> |
