MediaContentViewModel
ViewModel for displaying media items. Provides a list of MediaContentItemViewModel which is updated according to input LiveData parameters.
Parameters
A list of incoming IviMediaItem, which is transformed into items.
A media service that is used to get MediaServiceState: information about the currently active item, source, and playback state.
Used to match an item to the currently active item. This is needed to determine the item's IviPlaybackState.
An action that should be called when clicking an item from items list.
If true
, an empty list if items is returned. This is used to reduce visual glitches during content loading.
Used to determine ListGroupItem.ItemType for items.
If true
, the items would be grouped by ItemType.HEADER based on the IviMediaItem.groupTitleHint.
A dispatcher which is used during items mapping. Could be substituted for testing purposes.
Constructors
Properties
Whether any of items is currently MediaContentEntryItemViewModel.isActive.
Whether any of items is currently of ItemType.HEADER type.
List of items to be displayed by MediaContentView.