CommandButton.DisplayConstraints
@UnstableApi
public final class CommandButton.DisplayConstraints
Constraints for displaying a list of CommandButton instances with utilities to resolve these constraints for a given list of buttons.
Summary
Nested types |
|---|
public final class CommandButton.DisplayConstraints.BuilderA builder for |
Public methods |
|
|---|---|
ImmutableList<CommandButton> |
resolve(List<CommandButton> mediaButtonPreferences, Player player)Resolves a list of |
Public methods
resolve
public ImmutableList<CommandButton> resolve(List<CommandButton> mediaButtonPreferences, Player player)
Resolves a list of media button preferences according to these display constraints and returns the list of buttons to be displayed.
Note that the result of this resolution can change whenever the
mediaButtonPreferences change, or the player reports any of the following listener events:
EVENT_AVAILABLE_COMMANDS_CHANGEDEVENT_PLAY_WHEN_READY_CHANGEDEVENT_PLAYBACK_STATE_CHANGEDEVENT_PLAYBACK_SUPPRESSION_REASON_CHANGEDEVENT_PLAYBACK_STATE_CHANGEDEVENT_SEEK_BACK_INCREMENT_CHANGEDEVENT_SEEK_FORWARD_INCREMENT_CHANGED
| Parameters | |
|---|---|
List<CommandButton> mediaButtonPreferences |
The list of |
Player player |
The |
| Returns | |
|---|---|
ImmutableList<CommandButton> |
The resolved list of |