Added option to use circular play button
This commit is contained in:
parent
e328ac116e
commit
09572b2551
12 changed files with 30 additions and 43 deletions
|
@ -161,3 +161,4 @@ const val CUSTOM_FONT = "custom_font"
|
|||
const val APPBAR_MODE = "appbar_mode"
|
||||
const val WALLPAPER_ACCENT = "wallpaper_accent"
|
||||
const val SCREEN_ON_LYRICS = "screen_on_lyrics"
|
||||
const val CIRCLE_PLAY_BUTTON = "circle_play_button"
|
|
@ -147,7 +147,7 @@ class MainActivity : AbsCastActivity(), OnSharedPreferenceChangeListener {
|
|||
}
|
||||
|
||||
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) {
|
||||
if (key == GENERAL_THEME || key == MATERIAL_YOU || key == WALLPAPER_ACCENT || key == BLACK_THEME || key == ADAPTIVE_COLOR_APP || key == USER_NAME || key == TOGGLE_FULL_SCREEN || key == TOGGLE_VOLUME || key == ROUND_CORNERS || key == CAROUSEL_EFFECT || key == NOW_PLAYING_SCREEN_ID || key == TOGGLE_GENRE || key == BANNER_IMAGE_PATH || key == PROFILE_IMAGE_PATH || key == CIRCULAR_ALBUM_ART || key == KEEP_SCREEN_ON || key == TOGGLE_SEPARATE_LINE || key == TOGGLE_HOME_BANNER || key == TOGGLE_ADD_CONTROLS || key == ALBUM_COVER_STYLE || key == HOME_ARTIST_GRID_STYLE || key == ALBUM_COVER_TRANSFORM || key == DESATURATED_COLOR || key == EXTRA_SONG_INFO || key == TAB_TEXT_MODE || key == LANGUAGE_NAME || key == LIBRARY_CATEGORIES || key == CUSTOM_FONT|| key == APPBAR_MODE) {
|
||||
if (key == GENERAL_THEME || key == MATERIAL_YOU || key == WALLPAPER_ACCENT || key == BLACK_THEME || key == ADAPTIVE_COLOR_APP || key == USER_NAME || key == TOGGLE_FULL_SCREEN || key == TOGGLE_VOLUME || key == ROUND_CORNERS || key == CAROUSEL_EFFECT || key == NOW_PLAYING_SCREEN_ID || key == TOGGLE_GENRE || key == BANNER_IMAGE_PATH || key == PROFILE_IMAGE_PATH || key == CIRCULAR_ALBUM_ART || key == KEEP_SCREEN_ON || key == TOGGLE_SEPARATE_LINE || key == TOGGLE_HOME_BANNER || key == TOGGLE_ADD_CONTROLS || key == ALBUM_COVER_STYLE || key == HOME_ARTIST_GRID_STYLE || key == ALBUM_COVER_TRANSFORM || key == DESATURATED_COLOR || key == EXTRA_SONG_INFO || key == TAB_TEXT_MODE || key == LANGUAGE_NAME || key == LIBRARY_CATEGORIES || key == CUSTOM_FONT || key == APPBAR_MODE || key == CIRCLE_PLAY_BUTTON) {
|
||||
postRecreate()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ package code.name.monkey.retromusic.activities.base
|
|||
|
||||
import android.content.Context
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.view.KeyEvent
|
||||
|
@ -57,6 +56,9 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
if (PreferenceUtil.isCustomFont) {
|
||||
setTheme(R.style.FontThemeOverlay)
|
||||
}
|
||||
if (PreferenceUtil.circlePlayButton) {
|
||||
setTheme(R.style.CircleFABOverlay)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onWindowFocusChanged(hasFocus: Boolean) {
|
||||
|
|
|
@ -705,6 +705,9 @@ object PreferenceUtil {
|
|||
|
||||
val lyricsScreenOn
|
||||
get() = sharedPreferences.getBoolean(SCREEN_ON_LYRICS, false)
|
||||
|
||||
val circlePlayButton
|
||||
get() = sharedPreferences.getBoolean(CIRCLE_PLAY_BUTTON, false)
|
||||
}
|
||||
enum class LyricsType {
|
||||
REPLACE_LYRICS, OVER_LYRICS
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.MaterialComponents.CardView</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayDark</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -23,11 +23,7 @@
|
|||
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
|
||||
<item name="colorPrimary">@color/darkColorPrimary</item>
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -41,9 +38,6 @@
|
|||
<item name="android:windowBackground">@color/window_color_dark</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -57,9 +51,6 @@
|
|||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -7,9 +7,6 @@
|
|||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="about_album_label">About %s</string>
|
||||
<string name="about_settings_summary">Team, social links</string>
|
||||
|
@ -73,10 +72,10 @@
|
|||
<string name="app_shortcut_top_tracks_short">Top Tracks</string>
|
||||
<string name="app_widget_big_name">Full Image</string>
|
||||
<string name="app_widget_card_name">Card</string>
|
||||
<string name="app_widget_circle_name">@string/circle</string>
|
||||
<string name="app_widget_classic_name">Classic</string>
|
||||
<string name="app_widget_md3_name">MD3</string>
|
||||
<string name="app_widget_small_name">Small</string>
|
||||
<string name="app_widget_circle_name">@string/circle</string>
|
||||
<string name="app_widget_text_name">Minimal Text</string>
|
||||
<string name="artist">Artist</string>
|
||||
<string name="artists">Artists</string>
|
||||
|
@ -244,6 +243,7 @@
|
|||
<string name="my_name">Name</string>
|
||||
<string name="my_top_tracks">Most played</string>
|
||||
<string name="never">Never</string>
|
||||
<string name="new_music_mix">New Music Mix</string>
|
||||
<string name="new_playlist_title">New playlist</string>
|
||||
<string name="new_start_directory">%s is the new start directory.</string>
|
||||
<string name="next_song">Next Song</string>
|
||||
|
@ -349,18 +349,21 @@
|
|||
<string name="pref_summary_toggle_headset">Start playing immediately after headphones are connected</string>
|
||||
<string name="pref_summary_toggle_shuffle">Shuffle mode will turn off when playing a new list of songs</string>
|
||||
<string name="pref_summary_toggle_volume">If enough space is available, show volume controls in the now playing screen</string>
|
||||
<string name="pref_summary_wallpaper_accent">Extract accent color from wallpaper</string>
|
||||
<string name="pref_summary_whitelist">Only show music from /Music Folder</string>
|
||||
<string name="pref_title_album_art_on_lockscreen">Show album cover</string>
|
||||
<string name="pref_title_album_artists_only">Navigate by Album Artist</string>
|
||||
<string name="pref_title_album_cover_style">Album cover theme</string>
|
||||
<string name="pref_title_album_cover_transform">Album cover skip</string>
|
||||
<string name="pref_title_app_shortcuts">Colored app shortcuts</string>
|
||||
<string name="pref_title_appbar_mode">App bar mode</string>
|
||||
<string name="pref_title_audio_ducking">Reduce volume on focus loss</string>
|
||||
<string name="pref_title_audio_fade">Fade Audio</string>
|
||||
<string name="pref_title_auto_download_artist_images">Auto-download artist images</string>
|
||||
<string name="pref_title_blacklist">Blacklist</string>
|
||||
<string name="pref_title_bluetooth_playback">Bluetooth playback</string>
|
||||
<string name="pref_title_blurred_album_art">Blur album cover</string>
|
||||
<string name="pref_title_circle_button">Circular play button</string>
|
||||
<string name="pref_title_classic_notification">Classic notification design</string>
|
||||
<string name="pref_title_colored_app">Adaptive color</string>
|
||||
<string name="pref_title_colored_notification">Colored notification</string>
|
||||
|
@ -378,6 +381,7 @@
|
|||
<string name="pref_title_ignore_media_store_artwork">Ignore Media Store covers</string>
|
||||
<string name="pref_title_last_added_interval">Last added playlist interval</string>
|
||||
<string name="pref_title_lock_screen">Fullscreen controls</string>
|
||||
<string name="pref_title_lyrics_screen_on">Keep screen on when showing lyrics</string>
|
||||
<string name="pref_title_lyrics_type">Lyrics type</string>
|
||||
<string name="pref_title_now_playing_screen_appearance">Now playing theme</string>
|
||||
<string name="pref_title_open_source_licences">Open source licences</string>
|
||||
|
@ -390,6 +394,7 @@
|
|||
<string name="pref_title_toggle_toggle_headset">Auto-play</string>
|
||||
<string name="pref_title_toggle_toggle_shuffle">Shuffle mode</string>
|
||||
<string name="pref_title_toggle_volume">Volume controls</string>
|
||||
<string name="pref_title_wallpaper_accent">Wallpaper accent color</string>
|
||||
<string name="pref_title_whitelist">Whitelist Music</string>
|
||||
<string name="pro">Pro</string>
|
||||
<string name="pro_summary">Black theme, Now playing themes, Carousel effect and more..</string>
|
||||
|
@ -532,9 +537,4 @@
|
|||
<string name="you_have_to_select_at_least_one_category">You have to select at least one category.</string>
|
||||
<string name="you_will_be_forwarded_to_the_issue_tracker_website">You will be forwarded to the issue tracker website.</string>
|
||||
<string name="your_account_data_is_only_used_for_authentication">Your account data is only used for authentication.</string>
|
||||
<string name="new_music_mix">New Music Mix</string>
|
||||
<string name="pref_title_appbar_mode">App bar mode</string>
|
||||
<string name="pref_title_wallpaper_accent">Wallpaper accent color</string>
|
||||
<string name="pref_summary_wallpaper_accent">Extract accent color from wallpaper</string>
|
||||
<string name="pref_title_lyrics_screen_on">Keep screen on when showing lyrics</string>
|
||||
</resources>
|
||||
|
|
|
@ -251,5 +251,11 @@
|
|||
<item name="android:fontFamily">@font/manrope</item>
|
||||
</style>
|
||||
|
||||
<style name="CircleFABOverlay">
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AppWidget" parent="Theme.RetroMusic.FollowSystem" />
|
||||
</resources>
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
<item name="popupWindowStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>T
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -29,9 +26,6 @@
|
|||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlay</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -46,9 +40,6 @@
|
|||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayDark</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
@ -63,9 +54,6 @@
|
|||
<item name="popupMenuStyle">@style/MaterialPopupMenuStyle</item>
|
||||
<item name="materialCardViewStyle">@style/Widget.Material3.CardView.Elevated</item>
|
||||
<item name="elevationOverlayColor">@color/elevationOverlayLight</item>
|
||||
<item name="floatingActionButtonStyle">
|
||||
@style/Widget.MaterialComponents.FloatingActionButton
|
||||
</item>
|
||||
<item name="popupMenuBackground">@drawable/popup_background</item>
|
||||
</style>
|
||||
|
||||
|
|
|
@ -33,8 +33,14 @@
|
|||
android:defaultValue="false"
|
||||
android:key="screen_on_lyrics"
|
||||
android:layout="@layout/list_item_view_switch"
|
||||
android:title="@string/pref_title_lyrics_screen_on"
|
||||
android:summary="@string/pref_keep_screen_on_summary"/>
|
||||
android:summary="@string/pref_keep_screen_on_summary"
|
||||
android:title="@string/pref_title_lyrics_screen_on" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="circle_play_button"
|
||||
android:layout="@layout/list_item_view_switch"
|
||||
android:title="@string/pref_title_circle_button" />
|
||||
|
||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory
|
||||
android:layout="@layout/preference_category_title"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue