Package com.tomtom.ivi.appsuite.media.api.common.frontend.internal

Types

Link copied to clipboard
value class ActiveItemIndex(val value: Int)

An inline wrapper class to specify the index of the currently active item.

Link copied to clipboard
typealias ClickAction = (MediaContentEntryItemViewModel) -> Unit

Type alias for callback invoked when a MediaContentEntryItemViewModel is clicked.

Link copied to clipboard
data class DelayedDrawableResolver(afterDelayDrawableResolver: DrawableResolver) : DrawableResolver

A drawable that shows the afterDelayDrawableResolver only after DELAY_MS. The drawable shown before delay is provided by calling startDelay, otherwise afterDelayDrawableResolver is used.

Link copied to clipboard
class MediaContentEntryItemViewModel(    val mediaItem: IviMediaItem,     val itemState: IviPlaybackState,     val type: ListGroupItem.ItemType,     clickAction: ClickAction) : MediaContentItemViewModel

A MediaContentItemViewModel holds the information about an IviMediaItem.

Link copied to clipboard
class MediaContentHeaderItemViewModel(val title: String) : MediaContentItemViewModel

A MediaContentItemViewModel that represents a header.

Link copied to clipboard
sealed class MediaContentItemViewModel : ListGroupItem

Base class to hold the information about an IviMediaItem.

Link copied to clipboard
class MediaContentView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) : RecyclerView

A RecyclerView to display media content specified by MediaContentViewModel using MediaItemAdapter.

Link copied to clipboard
class MediaContentViewModel(    source: LiveData<List<IviMediaItem>>,     mediaService: MediaServiceApi,     @WorkerThread mediaItemMatcher: MediaItemMatcher,     onItemClickAction: ClickAction,     isLoading: LiveData<Boolean> = ImmutableLiveData(false),     layoutPolicy: LiveData<LayoutPolicy> = ImmutableLiveData(LinearLayoutPolicy()),     groupByHeaders: LiveData<Boolean> = ImmutableLiveData(true),     dispatcher: CoroutineDispatcher = Dispatchers.Default)

ViewModel for displaying media items. Provides a list of MediaContentItemViewModel which is updated according to input LiveData parameters.

Link copied to clipboard

A function to determine if the item is matching to the currently active item. This is needed to determine the item's IviPlaybackState.

Link copied to clipboard
class MediaServiceState(    val activeMediaItem: IviMediaItem?,     val activeQueueIndex: ActiveItemIndex?,     val playbackState: IviPlaybackState,     val activeSource: SourceInfo?)

Contains some properties of the MediaService used to determine the item's IviPlaybackState.