mirror of
https://github.com/antebudimir/tempus.git
synced 2026-04-15 16:27:26 +00:00
feat: increase items per row on landscape view (#411)
* feat: increase items per row on landscape view This covers the catalogues: artist, album and genre; also the list of albums on artist view. This was implemented by adierebel/tempo fork, I only cherry-picked some commits. Co-authored-by: adierebel <adie.rebel@gmail.com> * feat: add landscape layout to song listing views This includes the playlist page and the album page. * fix: bad scaling on small screens This rollbacks to the original code by adierebel/tempo fork * fix: remove hardcoded height blocking scroll This was addressed in 989ca35, forgot to fix it here as well * fix: wrap content height rather than inheriting it from parent * feat: add ui of choice selector in setting for items per row * feat: link getter to landscapes items per row setting an implement it * fix: wrong default value Co-authored-by: eddyizm <wtfisup@hotmail.com> * feat: add default value on setting string To introduce the new feature of landscape layouts. Co-authored-by: eddyizm <wtfisup@hotmail.com> --------- Co-authored-by: adierebel <adie.rebel@gmail.com> Co-authored-by: eddyizm <wtfisup@hotmail.com> Co-authored-by: eddyizm <eddyizm@gmail.com>
This commit is contained in:
parent
3de5390140
commit
5ad99b9f27
17 changed files with 737 additions and 12 deletions
|
|
@ -29,6 +29,7 @@ object Preferences {
|
|||
private const val REPEAT_MODE = "repeat_mode"
|
||||
private const val IMAGE_CACHE_SIZE = "image_cache_size"
|
||||
private const val STREAMING_CACHE_SIZE = "streaming_cache_size"
|
||||
private const val LANDSCAPE_ITEMS_PER_ROW = "landscape_items_per_row"
|
||||
private const val IMAGE_SIZE = "image_size"
|
||||
private const val MAX_BITRATE_WIFI = "max_bitrate_wifi"
|
||||
private const val MAX_BITRATE_MOBILE = "max_bitrate_mobile"
|
||||
|
|
@ -304,6 +305,11 @@ object Preferences {
|
|||
return App.getInstance().preferences.getString(IMAGE_CACHE_SIZE, "500")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getLandscapeItemsPerRow(): Int {
|
||||
return App.getInstance().preferences.getString(LANDSCAPE_ITEMS_PER_ROW, "4")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getImageSize(): Int {
|
||||
return App.getInstance().preferences.getString(IMAGE_SIZE, "-1")!!.toInt()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue