MediaEntryGroupItem

class MediaEntryGroupItem(    item: IviMediaItem,     itemState: LiveData<MediaEntryGroupItem.ItemState>,     val type: ListGroupItem.ItemType,     clickAction: ClickAction) : MediaGroupItem

A MediaGroupItem holds the information about an IviMediaItem.

Presentation of the item depends on the given hints, and results in a ListGroupItem showing the item in a list or a grid.

Parameters

item

The media item.

itemState

ItemState of this item.

clickAction

Action to perform when the item gets clicked or tapped by the user.

Constructors

Link copied to clipboard
fun MediaEntryGroupItem(    item: IviMediaItem,     itemState: LiveData<MediaEntryGroupItem.ItemState>,     type: ListGroupItem.ItemType,     clickAction: ClickAction)

Types

Link copied to clipboard
enum ItemState : Enum<MediaEntryGroupItem.ItemState>

Current playback state of a media item.

Properties

Link copied to clipboard
val artworkUri: Uri?

Uri of the image representing this item. null if no image is specified.

Link copied to clipboard
val duration: Duration

Duration of the track. Duration.ZERO when not available and never negative.

Link copied to clipboard
val durationLabel: StringResolver

Displayable label, showing the duration of the track in hours:minutes:seconds. Empty if the duration is not available.

Link copied to clipboard
val hasExplicitContent: Boolean
Link copied to clipboard
val isActive: LiveData<Boolean>

Whether this media item is currently highlighted by the system as being played, regardless of the actual playback state.

Link copied to clipboard
val isPlayable: Boolean

Whether the media item can be played or not.

Link copied to clipboard
val isPlaying: LiveData<Boolean>

Whether this item is currently being played.

Link copied to clipboard
val isStateDrawableVisible: LiveData<Boolean>

Whether this item should show its state drawable.

Link copied to clipboard
val stateDrawable: ResourceDrawableResolver

Drawable, indicating the playback state of the item.

Link copied to clipboard
val subtitle: String?

User-facing subtitle of this item. null if no subtitle is present.

Link copied to clipboard
open override val title: String

User-facing display title of the item.

Link copied to clipboard
open override val type: ListGroupItem.ItemType

Functions

Link copied to clipboard
open override fun onClick()

Action to perform when the item gets clicked or tapped by the user.

Inherited functions

Link copied to clipboard
open fun isGroupMember(): Boolean
Link copied to clipboard
open fun isHeader(): Boolean