From 5446e7b7d67bf6dab0e8da86c771a670e133737f Mon Sep 17 00:00:00 2001 From: Parthiv Vora Date: Fri, 13 Mar 2020 18:15:48 -0400 Subject: [PATCH] Android: Set up Day/Night mode for system-compatible optional dark theme --- Source/Android/app/build.gradle | 2 +- .../app/src/main/res/layout/activity_main.xml | 3 ++- .../app/src/main/res/layout/fragment_settings.xml | 2 +- .../main/res/values-night/styles_filepicker.xml | 4 ++++ Source/Android/app/src/main/res/values/styles.xml | 14 +++++++------- .../app/src/main/res/values/styles_filepicker.xml | 4 ++++ 6 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 Source/Android/app/src/main/res/values-night/styles_filepicker.xml create mode 100644 Source/Android/app/src/main/res/values/styles_filepicker.xml diff --git a/Source/Android/app/build.gradle b/Source/Android/app/build.gradle index 711ae5050e..802e4efada 100644 --- a/Source/Android/app/build.gradle +++ b/Source/Android/app/build.gradle @@ -81,7 +81,7 @@ dependencies { implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' 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. implementation 'androidx.leanback:leanback:1.0.0' diff --git a/Source/Android/app/src/main/res/layout/activity_main.xml b/Source/Android/app/src/main/res/layout/activity_main.xml index 3ff9ddae0f..95b631a698 100644 --- a/Source/Android/app/src/main/res/layout/activity_main.xml +++ b/Source/Android/app/src/main/res/layout/activity_main.xml @@ -13,10 +13,11 @@ + app:popupTheme="@style/ThemeOverlay.AppCompat.DayNight"/> diff --git a/Source/Android/app/src/main/res/values-night/styles_filepicker.xml b/Source/Android/app/src/main/res/values-night/styles_filepicker.xml new file mode 100644 index 0000000000..79af40c030 --- /dev/null +++ b/Source/Android/app/src/main/res/values-night/styles_filepicker.xml @@ -0,0 +1,4 @@ + + + - - - - -