ControlButtonsContainer

public interfaceControlButtonsContainer
Known Indirect Subclasses

An interface that defines a container which holds a certain number of slots to show control buttons.

Public Method Summary

abstractImageView
getButtonImageViewAt(int slotIndex)
Returns theImageView of the button atslotIndexin this container.
abstract int
getButtonSlotCount()
Returns the number of slots to hold control buttons in this container.
abstract int
getButtonTypeAt(int slotIndex)
Returns the type of the button atslotIndexin this container.
abstract UIMediaController
getUIMediaController()
Returns the UIMediaControllerused to bind views in this container.

Public Methods

public abstractImageView getButtonImageViewAt(int slotIndex)

Returns theImageView of the button atslotIndexin this container. TheImageView is defined in the layout of theActivitywhich implements this interface.

Parameters
slotIndex the index of the slot in this container.
Throws
IndexOutOfBoundsException ifslotIndexis either negative or greater or equal to the number of buttons slots.

public abstract intgetButtonSlotCount()

Returns the number of slots to hold control buttons in this container.

public abstract intgetButtonTypeAt(int slotIndex)

Returns the type of the button atslotIndexin this container.

Button types are defined as one of the ID resources:

  • @id/cast_button_type_empty:Not placing a button in this slot.
  • @id/cast_button_type_custom:A custom button.
  • @id/cast_button_type_play_pause_toggle:A button that toggles playback.
  • @id/cast_button_type_skip_previous:A button that skips to the previous item in the queue.
  • @id/cast_button_type_skip_next:A button that skips to the next item in the queue.
  • @id/cast_button_type_rewind_30_seconds:A button that rewinds the playback by 30 seconds.
  • @id/cast_button_type_forward_30_seconds:A button that skips forward the playback by 30 seconds.
  • @id/cast_button_type_mute_toggle:A button that mutes and unmutes the remote receiver.
  • @id/cast_button_type_closed_caption:A button that opens a dialog to select text and audio tracks.
Parameters
slotIndex the index of the slot in this container.
Throws
IndexOutOfBoundsException ifslotIndexis either negative or greater or equal to the number of buttons slots.

public abstract UIMediaControllergetUIMediaController()

Returns the UIMediaControllerused to bind views in this container.