mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Added setting to make album detail visible
This commit is contained in:
parent
079149c1d5
commit
cb0874dca4
4 changed files with 19 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
@ -507,4 +507,7 @@
|
|||
<string name="equalizer_not_supported">Not supported on this device</string>
|
||||
<string name="settings_app_equalizer">Equalizer</string>
|
||||
<string name="settings_app_equalizer_summary">Open the built-in equalizer</string>
|
||||
|
||||
<string name="settings_album_detail">Show album detail</string>
|
||||
<string name="settings_album_detail_summary">If enabled, show the album details like genre, song count etc. on the album page</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -110,6 +110,12 @@
|
|||
android:summary="@string/settings_music_directory_summary"
|
||||
android:key="music_directory_section_visibility" />
|
||||
|
||||
<SwitchPreference
|
||||
android:title="@string/settings_album_detail"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/settings_album_detail_summary"
|
||||
android:key="album_detail" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="@string/settings_title_playlist">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue