RepeatButton

Functions summary

Unit
@UnstableApi
@Composable
RepeatButton(
    player: Player?,
    toggleModeSequence: List<@Player.RepeatMode Int>,
    content: @Composable RepeatButtonState.() -> Unit
)

A state container for a button that cycles through repeat modes.

Functions

@UnstableApi
@Composable
fun RepeatButton(
    player: Player?,
    toggleModeSequence: List<@Player.RepeatMode Int> = listOf(Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL),
    content: @Composable RepeatButtonState.() -> Unit
): Unit

A state container for a button that cycles through repeat modes.

This composable manages the enabled state and click handling of a repeat button. The UI is provided by the content lambda, which has access to the RepeatButtonState.

Parameters
player: Player?

The Player to control.

toggleModeSequence: List<@Player.RepeatMode Int> = listOf(Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL)

The sequence of repeat modes to cycle through when the button is clicked. The default sequence is Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL.

content: @Composable RepeatButtonState.() -> Unit

The composable content to be displayed for the button.