Android: Move game grid options to Main/TV Activities

This commit is contained in:
Charles Lombardo committed 2022-12-17 02:00:48 -05:00
1 parent a1c4861ad8
commit 6090694eab
16 files changed
+337 -20

No files matched your search

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="?attr/colorControlNormal"
android:pathData="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z" />
</vector>
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportHeight="24"
android:viewportWidth="24">
<path
android:fillColor="@android:color/white"
android:pathData="M10,18h4v-2h-4v2zM3,6v2h18L21,6L3,6zM6,13h12v-2L6,11v2z" />
</vector>
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/grid_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="@dimen/spacing_xtralarge"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/root_download_covers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<TextView
android:id="@+id/text_download_covers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/download_game_covers"
app:layout_constraintBottom_toBottomOf="@+id/switch_download_covers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/switch_download_covers" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_download_covers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/root_show_titles"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<TextView
android:id="@+id/text_show_titles"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/show_titles_in_game_list"
app:layout_constraintBottom_toBottomOf="@+id/switch_show_titles"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/switch_show_titles" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/switch_show_titles"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/grid_sheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/root_download_covers"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:paddingTop="@dimen/spacing_xtralarge"
android:paddingBottom="@dimen/spacing_xtralarge"
android:clickable="true"
android:focusable="true">
<TextView
android:id="@+id/text_download_covers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:text="@string/download_game_covers"
app:layout_constraintBottom_toBottomOf="@+id/switch_download_covers"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/switch_download_covers" />
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switch_download_covers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -8,6 +8,12 @@
android:icon="@drawable/ic_settings"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/menu_grid_options"
android:title="@string/grid_menu_settings"
android:icon="@drawable/ic_list"
app:showAsAction="ifRoom"/>
<item
android:id="@+id/menu_refresh"
android:title="@string/grid_menu_refresh"
@@ -26,5 +26,6 @@
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Primary</item>
</style>
</resources>
@@ -26,5 +26,6 @@
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Primary</item>
</style>
</resources>
@@ -193,8 +193,7 @@
<string name="osd_messages">Show On-Screen Display Messages</string>
<string name="osd_messages_description">Display messages over the emulation screen area. These messages include memory card writes, video backend and CPU information, and JIT cache clearing.</string>
<string name="download_game_covers">Download Game Covers from GameTDB.com</string>
<string name="show_titles_in_game_list">Show Titles in Game List</string>
<string name="show_titles_in_game_list_description">Show the title and creator below each game cover.</string>
<string name="show_titles_in_game_list">Show Titles</string>
<string name="change_theme">Change App Theme</string>
<string name="change_theme_mode">Change Theme Mode</string>
<string name="use_black_backgrounds">Use Black Backgrounds</string>
@@ -442,6 +441,7 @@
<string name="add_games">Add Games</string>
<string name="add_directory_title">Add Folder to Library</string>
<string name="grid_menu_settings">Settings</string>
<string name="grid_menu_grid_options">Grid Options</string>
<string name="grid_menu_refresh">Refresh Library</string>
<string name="grid_menu_open_file">Open File</string>
<string name="grid_menu_install_wad">Install WAD</string>
@@ -60,4 +60,17 @@
<style name="DolphinDivider" parent="Widget.Material3.MaterialDivider">
<item name="dividerColor">?attr/colorSurfaceVariant</item>
</style>
<style name="ThemeOverlay.Dolphin.BottomSheetDialog" parent="ThemeOverlay.Material3.BottomSheetDialog">
<item name="android:navigationBarColor">@android:color/transparent</item>
</style>
<style name="Widget.Dolphin.ExtendedFloatingActionButton" parent="Widget.Material3.ExtendedFloatingActionButton.Primary">
<item name="materialThemeOverlay">@style/ThemeOverlay.Dolphin.ExtendedFloatingActionButton</item>
</style>
<style name="ThemeOverlay.Dolphin.ExtendedFloatingActionButton" parent="">
<item name="colorContainer">@color/dolphin_primary</item>
<item name="colorOnContainer">@color/dolphin_onPrimary</item>
</style>
</resources>
@@ -16,8 +16,8 @@
<style name="Theme.Dolphin" parent="Theme.Material3.DayNight.NoActionBar">
<item name="colorPrimary">@color/dolphin_primary</item>
<item name="colorOnPrimary">@color/dolphin_onPrimary</item>
<item name="colorPrimaryContainer">@color/dolphin_primary</item>
<item name="colorOnPrimaryContainer">@color/dolphin_onPrimary</item>
<item name="colorPrimaryContainer">@color/dolphin_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/dolphin_onPrimaryContainer</item>
<item name="colorSecondary">@color/dolphin_secondary</item>
<item name="colorOnSecondary">@color/dolphin_onSecondary</item>
<item name="colorSecondaryContainer">@color/dolphin_secondaryContainer</item>
@@ -53,17 +53,17 @@
<item name="popupTheme">@style/DolphinPopup</item>
<item name="sliderStyle">@style/DolphinSlider</item>
<item name="materialDividerStyle">@style/DolphinDivider</item>
<item name="bottomSheetDialogTheme">@style/ThemeOverlay.Dolphin.BottomSheetDialog</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Dolphin.ExtendedFloatingActionButton</item>
</style>
<!-- Trick for API >= 29 specific changes -->
<style name="Theme.Dolphin.Main" parent="Theme.Dolphin" />
<style name="Theme.Dolphin.Main.Material" parent="Theme.Dolphin.Main">
<item name="colorPrimaryContainer">@color/dolphin_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/dolphin_onPrimaryContainer</item>
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Primary</item>
</style>
<style name="Theme.Dolphin.Main.Green" parent="Theme.Dolphin.Main">
@@ -95,6 +95,7 @@
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Primary</item>
</style>
<style name="Theme.Dolphin.Main.Pink" parent="Theme.Dolphin.Main">
@@ -126,6 +127,7 @@
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
<item name="extendedFloatingActionButtonStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Primary</item>
</style>
<!-- Inherit from a base file picker theme that handles day/night -->