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

A builder for DisplayConstraints.

Public methods

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.

Public methods

resolve

public ImmutableList<CommandButtonresolve(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:

Parameters
List<CommandButton> mediaButtonPreferences

The list of media button preferences.

Player player

The Player used to determine default buttons for empty slots.

Returns
ImmutableList<CommandButton>

The resolved list of buttons to be displayed. Each button will have a single slot defined.