Updating
Constants names Proper namings Bottom tabs slide animation Added home album list style change
This commit is contained in:
parent
b9c12e20dd
commit
9850341d4c
81 changed files with 291 additions and 231 deletions
|
@ -397,12 +397,23 @@ object PreferenceUtil {
|
|||
}
|
||||
}
|
||||
|
||||
val homeGridStyle: Int
|
||||
val homeArtistGridStyle: Int
|
||||
get() {
|
||||
val position =
|
||||
sharedPreferences.getStringOrDefault(
|
||||
HOME_ARTIST_GRID_STYLE, "0"
|
||||
).toInt()
|
||||
val position = sharedPreferences.getStringOrDefault(
|
||||
HOME_ARTIST_GRID_STYLE, "0"
|
||||
).toInt()
|
||||
val typedArray =
|
||||
App.getContext().resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val layoutRes = typedArray.getResourceId(position, 0)
|
||||
typedArray.recycle()
|
||||
return if (layoutRes == 0) {
|
||||
R.layout.item_artist
|
||||
} else layoutRes
|
||||
}
|
||||
|
||||
val homeAlbumGridStyle: Int
|
||||
get() {
|
||||
val position = sharedPreferences.getStringOrDefault(HOME_ALBUM_GRID_STYLE, "0").toInt()
|
||||
val typedArray =
|
||||
App.getContext().resources.obtainTypedArray(R.array.pref_home_grid_style_layout)
|
||||
val layoutRes = typedArray.getResourceId(position, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue