From bc859ae1d2ba0b145ed0fcdd927d947862d82401 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Tue, 1 Oct 2019 23:32:48 +0530 Subject: [PATCH] Fix dark and black theme colours --- .../activities/base/AbsThemeActivity.kt | 2 +- .../fragments/base/AbsPlayerFragment.kt | 6 ++--- .../main/res/layout-land/fragment_home.xml | 1 + .../res/layout-xlarge-land/fragment_home.xml | 2 +- .../main/res/layout-xlarge/fragment_home.xml | 2 +- app/src/main/res/layout/fragment_home.xml | 4 ++- app/src/main/res/layout/fragment_library.xml | 1 - .../main/res/layout/fragment_mini_player.xml | 2 +- .../res/layout/sliding_music_panel_layout.xml | 2 +- app/src/main/res/values/colors.xml | 12 ++++++--- app/src/main/res/values/styles_parents.xml | 25 +++++++++++-------- 11 files changed, 35 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt index 5d8b029c..1ed11b20 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/base/AbsThemeActivity.kt @@ -134,7 +134,7 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable { } fun setNavigationbarColorAuto() { - setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface)) + setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSecondary)) } open fun setLightStatusbar(enabled: Boolean) { diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt index e78329fe..5db295e2 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/base/AbsPlayerFragment.kt @@ -14,7 +14,7 @@ import android.view.MenuItem import android.view.View import android.widget.Toast import androidx.appcompat.widget.Toolbar -import code.name.monkey.appthemehelper.ThemeStore +import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity import code.name.monkey.retromusic.activities.tageditor.SongTagEditorActivity @@ -247,12 +247,12 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - view.setBackgroundColor(ThemeStore.primaryColor(requireActivity())) + view.setBackgroundColor(ATHUtil.resolveColor(requireContext(), R.attr.colorSecondary)) if (PreferenceUtil.getInstance(requireContext()).fullScreenMode && view.findViewById(R.id.status_bar) != null) { view.findViewById(R.id.status_bar).visibility = View.GONE } - playerAlbumCoverFragment = requireFragmentManager().findFragmentById(R.id.playerAlbumCoverFragment) as PlayerAlbumCoverFragment? + playerAlbumCoverFragment = childFragmentManager.findFragmentById(R.id.playerAlbumCoverFragment) as PlayerAlbumCoverFragment? playerAlbumCoverFragment?.setCallbacks(this) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) diff --git a/app/src/main/res/layout-land/fragment_home.xml b/app/src/main/res/layout-land/fragment_home.xml index bb916846..2320ebaa 100644 --- a/app/src/main/res/layout-land/fragment_home.xml +++ b/app/src/main/res/layout-land/fragment_home.xml @@ -35,6 +35,7 @@ diff --git a/app/src/main/res/layout/fragment_library.xml b/app/src/main/res/layout/fragment_library.xml index 87fa8b7c..e5af0fb2 100644 --- a/app/src/main/res/layout/fragment_library.xml +++ b/app/src/main/res/layout/fragment_library.xml @@ -85,7 +85,6 @@ android:id="@+id/fragmentContainer" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_weight="1" app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" /> diff --git a/app/src/main/res/layout/fragment_mini_player.xml b/app/src/main/res/layout/fragment_mini_player.xml index cb4731af..677c099f 100644 --- a/app/src/main/res/layout/fragment_mini_player.xml +++ b/app/src/main/res/layout/fragment_mini_player.xml @@ -5,7 +5,7 @@ android:id="@+id/mini_player_content" android:layout_width="match_parent" android:layout_height="48dp" - android:background="?colorSurface" + android:background="?colorSecondary" android:clickable="true" android:focusable="false" tools:ignore="UnusedAttribute"> diff --git a/app/src/main/res/layout/sliding_music_panel_layout.xml b/app/src/main/res/layout/sliding_music_panel_layout.xml index ac5c7f35..b07223a1 100644 --- a/app/src/main/res/layout/sliding_music_panel_layout.xml +++ b/app/src/main/res/layout/sliding_music_panel_layout.xml @@ -48,7 +48,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="?colorSurface" + android:background="?colorSecondary" android:elevation="0dp" app:elevation="0dp" app:itemIconTint="@drawable/bottom_navigation_item_colors" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 344e8729..fdea77d7 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -12,12 +12,18 @@ #1E1E1E #000000 + #FFFFFF + #FEFEFE + #FFFFFF + #FEFEFE #121212 - #121212 - #1e1e1e + #181818 + #333333 + #1F1F1F #000000 + #000000 #000000 - #000000 + #121212 diff --git a/app/src/main/res/values/styles_parents.xml b/app/src/main/res/values/styles_parents.xml index 555e4ac7..0b074796 100644 --- a/app/src/main/res/values/styles_parents.xml +++ b/app/src/main/res/values/styles_parents.xml @@ -47,6 +47,7 @@ @style/MaterialAlertDialogTheme @color/darkColorPrimary + @color/darkColorSecondary @color/darkColorPrimary @color/mi_text_color_primary_dark @color/mi_text_color_secondary_dark @@ -80,20 +81,22 @@ false @color/blackColorPrimary - @color/blackColorPrimary @color/mi_text_color_primary_dark + @color/blackColorPrimary - @color/md_deep_purple_A200 - - @color/md_green_500 + @color/blackColorSecondary @color/mi_text_color_secondary_dark @color/md_green_A700 + @color/md_deep_purple_A200 + @color/md_white_1000 + @color/blackColorBackground + @color/mi_text_color_secondary_dark + @color/blackColorSurface @color/mi_text_color_primary_dark - @color/mi_text_color_secondary_dark - @color/md_white_1000 +