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 = (MediaEntryGroupItem) -> Unit

Type alias for callback invoked when a MediaEntryGroupItem 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 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 MediaGroupItem which is updated according to input LiveData parameters.

Link copied to clipboard
class MediaEntryGroupItem(    val mediaItem: IviMediaItem,     val itemState: MediaEntryGroupItem.ItemState,     val type: ListGroupItem.ItemType,     clickAction: ClickAction) : MediaGroupItem

A MediaGroupItem holds the information about an IviMediaItem.

Link copied to clipboard
sealed class MediaGroupItem : ListGroupItem

Base class to hold the information about an IviMediaItem.

Link copied to clipboard
class MediaHeaderGroupItem(val title: String) : MediaGroupItem

A MediaGroupItem that represents a header.

Link copied to clipboard
typealias MediaItemMatcher = (IviMediaItem, MediaServiceState, ActiveItemIndex) -> Boolean

A function to determine if the item is matching to the currently active item. This is needed to determine the MediaEntryGroupItem.ItemState.

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 MediaEntryGroupItem.ItemState.