Closed atiqmumtaz507 closed 1 month ago
val extras = Bundle() extras.putInt( MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_BROWSABLE, MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM ) extras.putBoolean("android.media.browse.CONTENT_STYLE_SUPPORTED", true) extras.putInt( MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_PLAYABLE, MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM )
mediaItems.add( MediaItem( MediaDescriptionCompat.Builder() .setMediaId("playlists") .setTitle("Playlists") .setIconUri(Uri.parse("android.resource://$packageName/${R.drawable.ic_play_button}")) .setExtras(extras) .build(), MediaItem.FLAG_BROWSABLE))
I have not defined any global styles and on the playlist Tab I have 2 items which are browsable. I want to show the items as a Grid Item for that reason I have set extras for that tab Items but the items are still shown as List Items.
val extras = Bundle() extras.putInt( MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_BROWSABLE, MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM ) extras.putBoolean("android.media.browse.CONTENT_STYLE_SUPPORTED", true) extras.putInt( MediaConstants.DESCRIPTION_EXTRAS_KEY_CONTENT_STYLE_PLAYABLE, MediaConstants.DESCRIPTION_EXTRAS_VALUE_CONTENT_STYLE_GRID_ITEM )
I have not defined any global styles and on the playlist Tab I have 2 items which are browsable. I want to show the items as a Grid Item for that reason I have set extras for that tab Items but the items are still shown as List Items.