mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Android: Set up Day/Night mode for system-compatible optional dark theme
This commit is contained in:
parent
bb7623e3ba
commit
5446e7b7d6
@ -81,7 +81,7 @@ dependencies {
|
|||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
implementation 'com.google.android.material:material:1.1.0'
|
||||||
|
|
||||||
// Android TV UI libraries.
|
// Android TV UI libraries.
|
||||||
implementation 'androidx.leanback:leanback:1.0.0'
|
implementation 'androidx.leanback:leanback:1.0.0'
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar_main"
|
android:id="@+id/toolbar_main"
|
||||||
|
android:background="?colorPrimary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
app:layout_scrollFlags="scroll|enterAlways"
|
app:layout_scrollFlags="scroll|enterAlways"
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight"/>
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tabs_platforms"
|
android:id="@+id/tabs_platforms"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/list_settings"
|
android:id="@+id/list_settings"
|
||||||
android:background="@android:color/white"
|
android:background="?android:attr/colorBackground"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="FilePickerBaseTheme" parent="NNF_BaseTheme" />
|
||||||
|
</resources>
|
@ -2,7 +2,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Inherit from the material theme -->
|
<!-- Inherit from the material theme -->
|
||||||
<style name="DolphinBase" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="DolphinBase" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<!-- Main theme colors -->
|
<!-- Main theme colors -->
|
||||||
<!-- Branding color for the app bar -->
|
<!-- Branding color for the app bar -->
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Same as above, but use default action bar, and mandate margins. -->
|
<!-- Same as above, but use default action bar, and mandate margins. -->
|
||||||
<style name="DolphinSettingsBase" parent="Theme.AppCompat.Light.DarkActionBar">
|
<style name="DolphinSettingsBase" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
<item name="colorAccent">@color/dolphin_purple</item>
|
<item name="colorAccent">@color/dolphin_purple</item>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
<!-- Inherit from the Base Dolphin Dialog Theme -->
|
<!-- Inherit from the Base Dolphin Dialog Theme -->
|
||||||
|
|
||||||
<style name="DolphinEmulationBase" parent="Theme.AppCompat.Light.DarkActionBar">
|
<style name="DolphinEmulationBase" parent="Theme.AppCompat.DayNight.DarkActionBar">
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
<item name="colorAccent">@color/dolphin_purple</item>
|
<item name="colorAccent">@color/dolphin_purple</item>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="DolphinEmulationTvBase" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="DolphinEmulationTvBase" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
<item name="colorAccent">@color/dolphin_purple</item>
|
<item name="colorAccent">@color/dolphin_purple</item>
|
||||||
@ -94,8 +94,8 @@
|
|||||||
<item name="android:textColor">@color/button_text_color</item>
|
<item name="android:textColor">@color/button_text_color</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- You can also inherit from NNF_BaseTheme.Light -->
|
<!-- Inherit from a base file picker theme that handles day/night -->
|
||||||
<style name="FilePickerTheme" parent="NNF_BaseTheme.Light">
|
<style name="FilePickerTheme" parent="FilePickerBaseTheme">
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
<item name="colorAccent">@color/dolphin_accent_gamecube</item>
|
<item name="colorAccent">@color/dolphin_accent_gamecube</item>
|
||||||
@ -111,7 +111,7 @@
|
|||||||
<item name="nnf_toolbarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
<item name="nnf_toolbarTheme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert">
|
<style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||||
<item name="colorPrimary">@color/dolphin_blue</item>
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
<item name="colorAccent">@color/dolphin_accent_gamecube</item>
|
<item name="colorAccent">@color/dolphin_accent_gamecube</item>
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="FilePickerBaseTheme" parent="NNF_BaseTheme.Light" />
|
||||||
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user