android / uamp

A sample audio app for Android
Apache License 2.0
13.11k stars 3.76k forks source link

Style does not apply on Tab Items. #545

Closed atiqmumtaz507 closed 1 month ago

atiqmumtaz507 commented 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.