Fix dark and black theme colours
This commit is contained in:
parent
790ce541f9
commit
bc859ae1d2
11 changed files with 35 additions and 24 deletions
|
@ -134,7 +134,7 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setNavigationbarColorAuto() {
|
fun setNavigationbarColorAuto() {
|
||||||
setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSurface))
|
setNavigationbarColor(ATHUtil.resolveColor(this, R.attr.colorSecondary))
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun setLightStatusbar(enabled: Boolean) {
|
open fun setLightStatusbar(enabled: Boolean) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.widget.Toolbar
|
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.R
|
||||||
import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
|
import code.name.monkey.retromusic.activities.tageditor.AbsTagEditorActivity
|
||||||
import code.name.monkey.retromusic.activities.tageditor.SongTagEditorActivity
|
import code.name.monkey.retromusic.activities.tageditor.SongTagEditorActivity
|
||||||
|
@ -247,12 +247,12 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(),
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
view.setBackgroundColor(ThemeStore.primaryColor(requireActivity()))
|
view.setBackgroundColor(ATHUtil.resolveColor(requireContext(), R.attr.colorSecondary))
|
||||||
if (PreferenceUtil.getInstance(requireContext()).fullScreenMode &&
|
if (PreferenceUtil.getInstance(requireContext()).fullScreenMode &&
|
||||||
view.findViewById<View>(R.id.status_bar) != null) {
|
view.findViewById<View>(R.id.status_bar) != null) {
|
||||||
view.findViewById<View>(R.id.status_bar).visibility = View.GONE
|
view.findViewById<View>(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)
|
playerAlbumCoverFragment?.setCallbacks(this)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?colorOnBackground"
|
||||||
app:liftOnScroll="true">
|
app:liftOnScroll="true">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="?colorOnBackground"
|
||||||
app:liftOnScroll="true">
|
app:liftOnScroll="true">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="?colorOnBackground"
|
||||||
app:liftOnScroll="true">
|
app:liftOnScroll="true">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
|
|
@ -31,8 +31,10 @@
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appBarLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?colorPrimary"
|
||||||
app:liftOnScroll="true">
|
app:liftOnScroll="true">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
@ -43,6 +45,7 @@
|
||||||
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
android:layout_marginTop="@dimen/toolbar_margin_vertical"
|
||||||
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
|
||||||
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
|
||||||
|
app:cardBackgroundColor="?colorSurface"
|
||||||
app:cardCornerRadius="8dp"
|
app:cardCornerRadius="8dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
|
@ -66,7 +69,6 @@
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||||
|
|
||||||
<include layout="@layout/home_content" />
|
<include layout="@layout/home_content" />
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
android:id="@+id/fragmentContainer"
|
android:id="@+id/fragmentContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:id="@+id/mini_player_content"
|
android:id="@+id/mini_player_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:background="?colorSurface"
|
android:background="?colorSecondary"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:background="?colorSurface"
|
android:background="?colorSecondary"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:itemIconTint="@drawable/bottom_navigation_item_colors"
|
app:itemIconTint="@drawable/bottom_navigation_item_colors"
|
||||||
|
|
|
@ -12,12 +12,18 @@
|
||||||
<color name="card_black_color">#1E1E1E</color>
|
<color name="card_black_color">#1E1E1E</color>
|
||||||
<color name="pitch_black">#000000</color>
|
<color name="pitch_black">#000000</color>
|
||||||
|
|
||||||
|
<color name="lightColorPrimary">#FFFFFF</color>
|
||||||
|
<color name="lightColorSecondary">#FEFEFE</color>
|
||||||
|
<color name="lightColorBackground">#FFFFFF</color>
|
||||||
|
<color name="lightColorSurface">#FEFEFE</color>
|
||||||
|
|
||||||
<color name="darkColorPrimary">#121212</color>
|
<color name="darkColorPrimary">#121212</color>
|
||||||
<color name="darkColorBackground">#121212</color>
|
<color name="darkColorSecondary">#181818</color>
|
||||||
<color name="darkColorSurface">#1e1e1e</color>
|
<color name="darkColorBackground">#333333</color>
|
||||||
|
<color name="darkColorSurface">#1F1F1F</color>
|
||||||
|
|
||||||
<color name="blackColorPrimary">#000000</color>
|
<color name="blackColorPrimary">#000000</color>
|
||||||
|
<color name="blackColorSecondary">#000000</color>
|
||||||
<color name="blackColorBackground">#000000</color>
|
<color name="blackColorBackground">#000000</color>
|
||||||
<color name="blackColorSurface">#000000</color>
|
<color name="blackColorSurface">#121212</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
||||||
|
|
||||||
<item name="colorPrimary">@color/darkColorPrimary</item>
|
<item name="colorPrimary">@color/darkColorPrimary</item>
|
||||||
|
<item name="colorSecondary">@color/darkColorSecondary</item>
|
||||||
<item name="colorPrimaryVariant">@color/darkColorPrimary</item>
|
<item name="colorPrimaryVariant">@color/darkColorPrimary</item>
|
||||||
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
|
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
|
||||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
||||||
|
@ -80,20 +81,22 @@
|
||||||
<item name="windowActionBar">false</item>
|
<item name="windowActionBar">false</item>
|
||||||
|
|
||||||
<item name="colorPrimary">@color/blackColorPrimary</item>
|
<item name="colorPrimary">@color/blackColorPrimary</item>
|
||||||
<item name="colorPrimaryVariant">@color/blackColorPrimary</item>
|
|
||||||
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
|
<item name="colorOnPrimary">@color/mi_text_color_primary_dark</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/blackColorPrimary</item>
|
||||||
|
|
||||||
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
<item name="colorSecondary">@color/blackColorSecondary</item>
|
||||||
|
|
||||||
<item name="colorSecondary">@color/md_green_500</item>
|
|
||||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
<item name="colorOnSecondary">@color/mi_text_color_secondary_dark</item>
|
||||||
<item name="colorSecondaryVariant">@color/md_green_A700</item>
|
<item name="colorSecondaryVariant">@color/md_green_A700</item>
|
||||||
|
|
||||||
|
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
||||||
|
<item name="colorControlNormal">@color/md_white_1000</item>
|
||||||
|
|
||||||
<item name="android:colorBackground">@color/blackColorBackground</item>
|
<item name="android:colorBackground">@color/blackColorBackground</item>
|
||||||
|
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
||||||
|
|
||||||
<item name="colorSurface">@color/blackColorSurface</item>
|
<item name="colorSurface">@color/blackColorSurface</item>
|
||||||
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
<item name="colorOnSurface">@color/mi_text_color_primary_dark</item>
|
||||||
<item name="colorOnBackground">@color/mi_text_color_secondary_dark</item>
|
|
||||||
<item name="colorControlNormal">@color/md_white_1000</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
|
@ -139,18 +142,18 @@
|
||||||
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
||||||
<!--<item name="android:textColorPrimary">@color/md_grey_900</item>-->
|
<!--<item name="android:textColorPrimary">@color/md_grey_900</item>-->
|
||||||
|
|
||||||
<item name="colorPrimary">@color/md_white_1000</item>
|
<item name="colorPrimary">@color/lightColorPrimary</item>
|
||||||
<item name="colorOnPrimary">@color/mi_text_color_primary_light</item>
|
<item name="colorSecondary">@color/lightColorSecondary</item>
|
||||||
<item name="colorPrimaryVariant">@color/md_red_400</item>
|
<item name="colorPrimaryVariant">@color/md_red_400</item>
|
||||||
|
|
||||||
<item name="colorSecondary">@color/md_green_500</item>
|
<item name="colorOnPrimary">@color/mi_text_color_primary_light</item>
|
||||||
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
<item name="colorAccent">@color/md_deep_purple_A200</item>
|
||||||
<item name="colorOnSecondary">@color/mi_text_color_secondary_light</item>
|
<item name="colorOnSecondary">@color/mi_text_color_secondary_light</item>
|
||||||
<item name="colorSecondaryVariant">@color/md_green_A700</item>
|
<item name="colorSecondaryVariant">@color/md_green_A700</item>
|
||||||
|
|
||||||
|
|
||||||
<item name="android:colorBackground">@color/md_white_1000</item>
|
<item name="android:colorBackground">@color/lightColorBackground</item>
|
||||||
<item name="colorSurface">@color/md_white_1000</item>
|
<item name="colorSurface">@color/lightColorSurface</item>
|
||||||
<item name="colorOnSurface">@color/mi_text_color_secondary_light</item>
|
<item name="colorOnSurface">@color/mi_text_color_secondary_light</item>
|
||||||
<item name="colorOnBackground">@color/mi_text_color_secondary_light</item>
|
<item name="colorOnBackground">@color/mi_text_color_secondary_light</item>
|
||||||
<item name="colorControlNormal">@color/mi_text_color_secondary_light</item>
|
<item name="colorControlNormal">@color/mi_text_color_secondary_light</item>
|
||||||
|
|
Loading…
Reference in a new issue