From ceaffa254bdd25f3694ffe6becfb5cd99d04c996 Mon Sep 17 00:00:00 2001 From: cba Date: Thu, 9 Oct 2025 23:03:25 +0200 Subject: [PATCH 1/3] removed dropdown for album info --- .../tempo/ui/fragment/AlbumPageFragment.java | 8 --- .../main/res/layout/fragment_album_page.xml | 61 +++++-------------- 2 files changed, 14 insertions(+), 55 deletions(-) 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..3d3645ed 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 @@ -212,14 +212,6 @@ public class AlbumPageFragment extends Fragment implements ClickCallback { bind.animToolbar.setNavigationOnClickListener(v -> activity.navController.navigateUp()); Objects.requireNonNull(bind.animToolbar.getOverflowIcon()).setTint(requireContext().getResources().getColor(R.color.titleTextColor, null)); - - bind.albumOtherInfoButton.setOnClickListener(v -> { - if (bind.albumDetailView.getVisibility() == View.GONE) { - bind.albumDetailView.setVisibility(View.VISIBLE); - } else if (bind.albumDetailView.getVisibility() == View.VISIBLE) { - bind.albumDetailView.setVisibility(View.GONE); - } - }); } private void initAlbumInfoTextButton() { diff --git a/app/src/main/res/layout/fragment_album_page.xml b/app/src/main/res/layout/fragment_album_page.xml index 411d5c1c..1be64373 100644 --- a/app/src/main/res/layout/fragment_album_page.xml +++ b/app/src/main/res/layout/fragment_album_page.xml @@ -59,23 +59,6 @@ app:layout_constraintStart_toStartOf="@+id/album_cover_image_view" app:layout_constraintTop_toBottomOf="@+id/album_cover_image_view" /> - - - - - - - - - - + app:layout_constraintTop_toBottomOf="@+id/album_notes_textview" /> Date: Sat, 18 Oct 2025 00:37:06 +0200 Subject: [PATCH 2/3] Revert "removed dropdown for album info" This reverts commit ceaffa254bdd25f3694ffe6becfb5cd99d04c996. --- .../tempo/ui/fragment/AlbumPageFragment.java | 8 +++ .../main/res/layout/fragment_album_page.xml | 61 ++++++++++++++----- 2 files changed, 55 insertions(+), 14 deletions(-) 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 3d3645ed..d0b417d7 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 @@ -212,6 +212,14 @@ public class AlbumPageFragment extends Fragment implements ClickCallback { bind.animToolbar.setNavigationOnClickListener(v -> activity.navController.navigateUp()); Objects.requireNonNull(bind.animToolbar.getOverflowIcon()).setTint(requireContext().getResources().getColor(R.color.titleTextColor, null)); + + bind.albumOtherInfoButton.setOnClickListener(v -> { + if (bind.albumDetailView.getVisibility() == View.GONE) { + bind.albumDetailView.setVisibility(View.VISIBLE); + } else if (bind.albumDetailView.getVisibility() == View.VISIBLE) { + bind.albumDetailView.setVisibility(View.GONE); + } + }); } private void initAlbumInfoTextButton() { diff --git a/app/src/main/res/layout/fragment_album_page.xml b/app/src/main/res/layout/fragment_album_page.xml index 1be64373..411d5c1c 100644 --- a/app/src/main/res/layout/fragment_album_page.xml +++ b/app/src/main/res/layout/fragment_album_page.xml @@ -59,6 +59,23 @@ app:layout_constraintStart_toStartOf="@+id/album_cover_image_view" app:layout_constraintTop_toBottomOf="@+id/album_cover_image_view" /> + + + + + + + + + + + app:layout_constraintTop_toBottomOf="@+id/album_detail_view" /> Date: Sat, 18 Oct 2025 01:00:00 +0200 Subject: [PATCH 3/3] 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" /> + +