[Playlists] Added Grid size selection for Playlists
This commit is contained in:
parent
c52d02ea10
commit
d6bc78619b
5 changed files with 99 additions and 13 deletions
|
@ -40,7 +40,7 @@ public class AutoGeneratedPlaylistBitmap {
|
|||
List<Bitmap> art = new ArrayList<>();
|
||||
for (Long id : albumID) {
|
||||
Bitmap bitmap = getBitmapWithAlbumId(context, id);
|
||||
if (bitmap != null) art.add(BitmapEditor.getRoundedCornerBitmap(bitmap, 10));
|
||||
if (bitmap != null) art.add(BitmapEditor.getRoundedCornerBitmap(bitmap, 20));
|
||||
if (art.size() == 9) break;
|
||||
}
|
||||
return MergedImageUtils.INSTANCE.joinImages(art);
|
||||
|
|
|
@ -498,6 +498,25 @@ object PreferenceUtil {
|
|||
}
|
||||
|
||||
|
||||
var playlistGridSize
|
||||
get() = sharedPreferences.getInt(
|
||||
PLAYLIST_GRID_SIZE,
|
||||
App.getContext().getIntRes(R.integer.default_grid_columns)
|
||||
)
|
||||
set(value) = sharedPreferences.edit {
|
||||
putInt(PLAYLIST_GRID_SIZE, value)
|
||||
}
|
||||
|
||||
|
||||
var playlistGridSizeLand
|
||||
get() = sharedPreferences.getInt(
|
||||
PLAYLIST_GRID_SIZE_LAND,
|
||||
App.getContext().getIntRes(R.integer.default_grid_columns_land)
|
||||
)
|
||||
set(value) = sharedPreferences.edit {
|
||||
putInt(PLAYLIST_GRID_SIZE, value)
|
||||
}
|
||||
|
||||
var albumCoverStyle: AlbumCoverStyle
|
||||
get() {
|
||||
val id: Int = sharedPreferences.getInt(ALBUM_COVER_STYLE, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue