From a092ad9ac708cc4aa0f42224677d1e445bad67a8 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Fri, 17 May 2019 09:35:13 +0530 Subject: [PATCH] Adding DayNight theme --- app/build.gradle | 2 +- app/src/main/assets/retro-changelog.html | 2 +- .../retromusic/fragments/settings/ThemeSettingsFragment.kt | 5 +++++ app/src/main/res/values-night/styles-parents.xml | 6 ++---- app/src/main/res/values/arrays.xml | 4 ---- app/src/main/res/values/strings.xml | 2 ++ 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cef1f9c7..65b80979 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,7 +31,7 @@ android { vectorDrawables.useSupportLibrary = true applicationId "code.name.monkey.retromusic" - versionCode 321 + versionCode 323 versionName '3.1.700' multiDexEnabled true diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index 132aa8ee..da4aeefc 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file +

v3.1.700

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/ThemeSettingsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/ThemeSettingsFragment.kt index a9eb816d..24f829a3 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/ThemeSettingsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/ThemeSettingsFragment.kt @@ -23,6 +23,7 @@ import androidx.preference.Preference import androidx.preference.TwoStatePreference import code.name.monkey.appthemehelper.* import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference +import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.VersionUtils import code.name.monkey.retromusic.App @@ -85,6 +86,10 @@ class ThemeSettingsFragment : AbsSettingsFragment() { "light" -> ThemeStore.editTheme(context!!).primaryColor(Color.WHITE).commit() "black" -> ThemeStore.editTheme(context!!).primaryColor(Color.BLACK).commit() "dark" -> ThemeStore.editTheme(context!!).primaryColor(ContextCompat.getColor(context!!, R.color.md_grey_900)).commit() + "daynight" -> { + val color = ATHUtil.resolveColor(context!!, android.R.attr.colorPrimary) + ThemeStore.editTheme(context!!).primaryColor(color).commit() + } "color" -> ThemeStore.editTheme(context!!).primaryColor(ContextCompat.getColor(context!!, R.color.md_blue_grey_800)).commit() } diff --git a/app/src/main/res/values-night/styles-parents.xml b/app/src/main/res/values-night/styles-parents.xml index 8783b222..03effed6 100644 --- a/app/src/main/res/values-night/styles-parents.xml +++ b/app/src/main/res/values-night/styles-parents.xml @@ -2,7 +2,7 @@