Added new theme for Material You & a toggle
This commit is contained in:
parent
289557898e
commit
f23b102e41
34 changed files with 243 additions and 123 deletions
34
app/src/main/res/drawable-v31/rect_selector.xml
Normal file
34
app/src/main/res/drawable-v31/rect_selector.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:attr/colorControlHighlight">
|
||||
|
||||
<item android:id="@android:id/mask">
|
||||
<shape>
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@color/md_green_500" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<selector>
|
||||
<item android:state_activated="true">
|
||||
<shape>
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@android:color/system_neutral1_300" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
</item>
|
||||
</ripple>
|
|
@ -13,6 +13,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/action_play_all"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
|
@ -26,12 +27,12 @@
|
|||
android:id="@+id/shuffleAction"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/shuffle"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playAction"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/action_play_all"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
|
@ -27,13 +28,12 @@
|
|||
android:id="@+id/shuffleAction"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/shuffle"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:backgroundTint="?attr/colorSurface"
|
||||
app:icon="@drawable/ic_shuffle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playAction"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="10dp">
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/playAction"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/action_play_all"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
|
@ -38,12 +38,12 @@
|
|||
android:id="@+id/shuffleAction"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@string/shuffle"
|
||||
android:textAppearance="@style/TextViewButton"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:icon="@drawable/ic_shuffle" />
|
||||
|
||||
</LinearLayout>
|
|
@ -55,17 +55,12 @@
|
|||
|
||||
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||
android:id="@+id/bottomNavigationView"
|
||||
style="@style/Widget.Material3.BottomNavigationView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/bottom_nav_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="0dp"
|
||||
app:itemHorizontalTranslationEnabled="false"
|
||||
app:itemIconTint="@drawable/bottom_navigation_item_colors"
|
||||
app:itemTextAppearanceActive="@style/BottomSheetItemTextAppearance"
|
||||
app:itemTextAppearanceInactive="@style/BottomSheetItemTextAppearance"
|
||||
app:itemTextColor="@drawable/bottom_navigation_item_colors"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:menu="@menu/bottom_navigation_main"
|
||||
tools:layout_height="56dp" />
|
||||
tools:layout_height="wrap_content" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
4
app/src/main/res/values-night-v31/colors.xml
Normal file
4
app/src/main/res/values-night-v31/colors.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="m3_accent_color">@android:color/system_accent1_200</color>
|
||||
</resources>
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<resources>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.RetroMusic.Base.MD3.DayNight">
|
||||
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
|
@ -27,9 +27,11 @@
|
|||
<item name="bottomNavigationStyle">@style/Widget.Material3.BottomNavigationView</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.RetroMusic.Base.MD3.Dark">
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="md_background_color">@color/darkColorPrimary</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
|
@ -47,9 +49,11 @@
|
|||
<item name="bottomNavigationStyle">@style/Widget.Material3.BottomNavigationView</item>
|
||||
<item name="android:windowBackground">@color/window_color_dark</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.RetroMusic.Base.MD3.Light">
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
|
@ -64,5 +68,7 @@
|
|||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="bottomNavigationStyle">@style/Widget.Material3.BottomNavigationView</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColorLight</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
|
||||
</style>
|
||||
</resources>
|
4
app/src/main/res/values-v31/colors.xml
Normal file
4
app/src/main/res/values-v31/colors.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="m3_accent_color">@android:color/system_accent1_600</color>
|
||||
</resources>
|
4
app/src/main/res/values-v31/donottranslate.xml
Normal file
4
app/src/main/res/values-v31/donottranslate.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<bool name="md3_available">true</bool>
|
||||
</resources>
|
9
app/src/main/res/values-v31/styles.xml
Normal file
9
app/src/main/res/values-v31/styles.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<resources>
|
||||
<style name="Theme.RetroMusic.MD3" parent="@style/Theme.Material3.DayNight.NoActionBar" >
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomSheetStyle" parent="Widget.MaterialComponents.BottomSheet">
|
||||
<item name="android:maxWidth">@empty</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Light" parent="Theme.Material3.Light.NoActionBar" />
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.DayNight" parent="Theme.Material3.DayNight.NoActionBar" />
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Dark" parent="Theme.Material3.DayNight.NoActionBar" />
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Black" parent="Theme.Material3.DayNight.NoActionBar" />
|
||||
|
||||
</resources>
|
|
@ -35,5 +35,4 @@
|
|||
<color name="bottomSheetColorBlack">#000000</color>
|
||||
|
||||
<color name="bottomSheetColor">#FFFFFF</color>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
<dimen name="now_playing_top_margin">12dp</dimen>
|
||||
|
||||
<dimen name="icon_notification_dimen">32dp</dimen>
|
||||
<dimen name="mini_player_height_expanded">112dp</dimen>
|
||||
<dimen name="mini_cast_player_height_expanded">120dp</dimen>
|
||||
<dimen name="mini_player_height_expanded">136dp</dimen>
|
||||
<dimen name="mini_cast_player_height_expanded">144dp</dimen>
|
||||
<dimen name="toolbar_margin_horizontal">8dp</dimen>
|
||||
<dimen name="toolbar_height">48dp</dimen>
|
||||
<dimen name="item_song_height">52dp</dimen>
|
||||
|
@ -53,5 +53,5 @@
|
|||
<dimen name="indicator_radius">10dp</dimen>
|
||||
<dimen name="lyrics_dialog_radius">20dp</dimen>
|
||||
<dimen name="cast_mini_player_height">64dp</dimen>
|
||||
<dimen name="bottom_nav_height">56dp</dimen>
|
||||
<dimen name="bottom_nav_height">80dp</dimen>
|
||||
</resources>
|
||||
|
|
|
@ -21,4 +21,8 @@
|
|||
<string name="app_shortcut_top_tracks_long" translatable="false">@string/my_top_tracks</string>
|
||||
|
||||
<string name="empty_text_emoji" translatable="false">😱</string>
|
||||
|
||||
<!-- Material You -->
|
||||
<string name="pref_title_md3">Material You</string>
|
||||
<bool name="md3_available">false</bool>
|
||||
</resources>
|
|
@ -23,6 +23,16 @@
|
|||
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.MD3" parent="@style/Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.DayNight</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="popupWindowStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Notification" parent="@android:style/TextAppearance.StatusBar.EventContent" />
|
||||
|
||||
<style name="Theme.RetroMusic.Notification.Title" parent="@android:style/TextAppearance.StatusBar.EventContent.Title" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.RetroMusic.Base.MD3.DayNight">
|
||||
<style name="Theme.RetroMusic.Base.Adaptive" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
|
@ -15,9 +15,11 @@
|
|||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="popupWindowStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.RetroMusic.Base.MD3.Dark">
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="md_background_color">@color/darkColorSurface</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="android:windowActivityTransitions">true</item>
|
||||
|
@ -34,9 +36,11 @@
|
|||
<item name="android:windowBackground">@color/window_color_dark</item>
|
||||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Black" parent="Theme.RetroMusic.Base.MD3.Black">
|
||||
<style name="Theme.RetroMusic.Base.Black" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="md_background_color">@color/blackColorSurface</item>
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
|
@ -51,9 +55,11 @@
|
|||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="bottomSheetTint">@color/bottomSheetColorBlack</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayBlack</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.RetroMusic.Base.MD3.Light">
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
|
@ -68,32 +74,10 @@
|
|||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
</style>
|
||||
|
||||
<!-- Base Themes -->
|
||||
<style name="Theme.RetroMusic.Base.MD3" parent="Theme.RetroMusic.Base" />
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Light" parent="Theme.Material3.Light.NoActionBar">
|
||||
<item name="bottomSheetTint">@color/bottomSheetColorLight</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.DayNight" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Dark" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="bottomSheetTint">@color/bottomSheetColor</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.MD3.Black" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<item name="bottomSheetTint">@color/bottomSheetColorBlack</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayBlack</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="MusicProgressSliderParent">
|
||||
<item name="android:progressDrawable">@android:color/transparent</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
|
|
@ -17,10 +17,19 @@
|
|||
app:icon="@drawable/ic_color_lens" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:dependency="material_you"
|
||||
android:key="black_theme"
|
||||
android:layout="@layout/list_item_view_switch_no_title"
|
||||
android:title="@string/black_theme_name" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:disableDependentsState="true"
|
||||
android:key="material_you"
|
||||
android:layout="@layout/list_item_view_switch_no_title"
|
||||
android:title="@string/pref_title_md3"
|
||||
app:isPreferenceVisible="@bool/md3_available" />
|
||||
|
||||
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
|
||||
|
@ -29,6 +38,7 @@
|
|||
android:title="@string/colors">
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
|
||||
android:dependency="material_you"
|
||||
android:key="accent_color"
|
||||
android:layout="@layout/list_item_color_view"
|
||||
android:persistent="false"
|
||||
|
@ -38,6 +48,7 @@
|
|||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="material_you"
|
||||
android:key="desaturated_color"
|
||||
android:layout="@layout/list_item_view_switch"
|
||||
android:summary="@string/pref_summary_desaturated_color"
|
||||
|
@ -52,6 +63,7 @@
|
|||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="material_you"
|
||||
android:key="should_color_app_shortcuts"
|
||||
android:layout="@layout/list_item_view_switch"
|
||||
android:summary="@string/pref_summary_colored_app_shortcuts"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue