From cb0874dca49fc143dfe6ff46d95ee123831f8944 Mon Sep 17 00:00:00 2001 From: cba Date: Sat, 18 Oct 2025 01:00:00 +0200 Subject: [PATCH] Added setting to make album detail visible --- .../tempo/ui/fragment/AlbumPageFragment.java | 4 ++++ .../java/com/cappielloantonio/tempo/util/Preferences.kt | 6 ++++++ app/src/main/res/values/strings.xml | 3 +++ app/src/main/res/xml/global_preferences.xml | 6 ++++++ 4 files changed, 19 insertions(+) diff --git a/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java b/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java index d0b417d7..d8fe82cc 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java +++ b/app/src/main/java/com/cappielloantonio/tempo/ui/fragment/AlbumPageFragment.java @@ -220,6 +220,10 @@ public class AlbumPageFragment extends Fragment implements ClickCallback { bind.albumDetailView.setVisibility(View.GONE); } }); + + if(Preferences.showAlbumDetail()){ + bind.albumDetailView.setVisibility(View.VISIBLE); + } } private void initAlbumInfoTextButton() { diff --git a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt index 62a5e276..9baaca1c 100644 --- a/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt +++ b/app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt @@ -76,6 +76,7 @@ object Preferences { private const val EQUALIZER_ENABLED = "equalizer_enabled" private const val EQUALIZER_BAND_LEVELS = "equalizer_band_levels" private const val MINI_SHUFFLE_BUTTON_VISIBILITY = "mini_shuffle_button_visibility" + private const val ALBUM_DETAIL = "album_detail" @JvmStatic fun getServer(): String? { @@ -638,4 +639,9 @@ object Preferences { if (parts.size < bandCount) return ShortArray(bandCount.toInt()) return ShortArray(bandCount.toInt()) { i -> parts[i].toShortOrNull() ?: 0 } } + + @JvmStatic + fun showAlbumDetail(): Boolean { + return App.getInstance().preferences.getBoolean(ALBUM_DETAIL, false) + } } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2b8e025a..3834a4bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -507,4 +507,7 @@ Not supported on this device Equalizer Open the built-in equalizer + + Show album detail + If enabled, show the album details like genre, song count etc. on the album page diff --git a/app/src/main/res/xml/global_preferences.xml b/app/src/main/res/xml/global_preferences.xml index ad15349d..4610e255 100644 --- a/app/src/main/res/xml/global_preferences.xml +++ b/app/src/main/res/xml/global_preferences.xml @@ -110,6 +110,12 @@ android:summary="@string/settings_music_directory_summary" android:key="music_directory_section_visibility" /> + +