CompactProcessViewModel

A ViewModel used for populating the templates of MainProcessPanels and TaskProcessPanels.

The template is divided into several sections. Each section can be populated by its own data field in this ViewModel.

A schematic overview of the vertical main process panel template:

 __________________________________________________________
| |
| ______ |
| | | |
| | Logo | |
| |______| |
| _________________________ |
| | | |
| | | | Process metadata
| | | | section
| | Image | |
| | | |
| | | |
| |_________________________| |
| Primary Text |
| Secondary Text |
|__________________________________________________________|
| |
| Progress | Progress bar
|__________________________________________________________| section
| __________ __________ __________ |
| | | | | | | | Primary controls
| | Button 1 | | Button 2 | | Button n | | section
| |__________|, |__________|...|__________| |
|__________________________________________________________|
| __________ __________ __________ |
| | | | | | | | Secondary controls
| | Button 1 | | Button 2 | | Button n | | section
| |__________|, |__________|...|__________| |
|__________________________________________________________|

Parameters

P

The type of the panel.

panel

The panel of type P that hosts this ViewModel.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
@IviExperimental(reasons = [])
class ProgressViewModel(val progress: LiveData<TimeTransition?> = ImmutableLiveData(null), val isBuffering: LiveData<Boolean> = ImmutableLiveData(false))

A ViewModel containing information required to display a progress bar.

Properties

Link copied to clipboard
open val maxPrimaryItems: Int?

The maximum number of controls for primaryControlsViewModel. If there are more controls, they are not displayed. Default value is MAX_NUMBER_OF_CONTROLS_PER_SECTION. If the value is null, there is no maximum.

Link copied to clipboard

The maximum number of controls for secondaryControlsViewModel. If there are more controls, they are not displayed. Default value is MAX_NUMBER_OF_CONTROLS_PER_SECTION. If the value is null, there is no maximum.

Link copied to clipboard

The metadata that describes an ongoing process. This allows the user to recognise what the ongoing process is about.

Link copied to clipboard
abstract val primaryControlsViewModel: LiveData<VisibilityProvidingCompositeViewModel<CompactProcessControlViewModel>>

A ViewModel containing a list of buttons to offer in the main process panel or task process panel. The primary buttons commonly impact the ongoing process directly. E.g., skipping a song.

Link copied to clipboard

A ViewModel containing information required to display a progress bar.

Link copied to clipboard
abstract val secondaryControlsViewModel: LiveData<VisibilityProvidingCompositeViewModel<CompactProcessControlViewModel>>

A ViewModel containing a list of buttons to offer in the main process panel or task process panel. The secondary buttons commonly do not impact the ongoing process but offer actions related to the ongoing process. E.g., liking a song.

Link copied to clipboard
open val tag: Int? = null

An ID tag which can be overridden to find a specific main process panel or task process panel during tests by use of the withIdTag() matcher.

Inherited properties

Link copied to clipboard
Link copied to clipboard
override val lifecycle: Lifecycle
Link copied to clipboard
open override val panel: P

Inherited functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard