public abstract class AbstractButtonController extends AbstractComponent implements ButtonController, RemoteControlKeyState
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractButtonController.Visibility |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_AUDIO_TRACKS_BUTTON_ID |
static int |
DEFAULT_CAPTIONS_BUTTON_ID |
static int |
DEFAULT_FAST_FORWARD_BUTTON_ID |
static int |
DEFAULT_FULL_SCREEN_BUTTON_ID |
static int |
DEFAULT_LIVE_BUTTON_ID |
static int |
DEFAULT_PLAY_BUTTON_ID |
static int |
DEFAULT_REWIND_BUTTON_ID |
static int |
DEFAULT_SEEK_BUTTON_ID |
protected java.util.Map<java.lang.String,java.lang.Object> |
properties
A set of properties supplied when emitting events as part of button click handling.
|
protected java.util.List<ButtonState> |
stateList
A list of states the button will sequence through as it is clicked.
|
protected BaseVideoView |
videoView
The Brightcove video view, provided as a convenience to subclasses.
|
eventEmitter, listenerTokens| Constructor and Description |
|---|
AbstractButtonController(android.content.Context context,
BaseVideoView videoView,
android.view.View controlBar,
int id,
android.graphics.Typeface font)
Builds a complete controller.
|
| Modifier and Type | Method and Description |
|---|---|
android.widget.Button |
getButton()
Implements a getter for the button.
|
EventEmitter |
getEventEmitter()
Implements a getter for the SDK event emitter.
|
android.graphics.Typeface |
getFont()
Gets the button font.
|
int |
getId()
Obtains the Android resource id for the button being controlled.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Implements a default behavior to get the current properties without any additional processing.
|
java.util.List<ButtonState> |
getStateList()
Gets the button state list providing information about the states associated with a button face.
|
int |
getVisibilityState()
Gets the maintained visibility state for a button.
|
boolean |
onBack(android.view.KeyEvent event)
On back key actioned
|
boolean |
onDpadCenter(android.view.KeyEvent event)
On dpad center key actioned
|
boolean |
onDpadDown(android.view.KeyEvent event)
On dpad down key actioned
|
boolean |
onDpadLeft(android.view.KeyEvent event)
On dpad left key actioned
|
boolean |
onDpadRight(android.view.KeyEvent event)
On dpad right key actioned
|
boolean |
onDpadUp(android.view.KeyEvent event)
On dpad up key actioned
|
boolean |
onFastForward(android.view.KeyEvent event)
On fast forward key actioned
|
boolean |
onHome(android.view.KeyEvent event)
On home key actioned
|
boolean |
onMenu(android.view.KeyEvent event)
On menu key actioned
|
boolean |
onPause(android.view.KeyEvent event)
On pause key actioned
|
boolean |
onPlay(android.view.KeyEvent event)
On play key actioned
|
boolean |
onPlayPause(android.view.KeyEvent event)
On play pause key actioned
|
boolean |
onRewind(android.view.KeyEvent event)
On rewind key actioned
|
boolean |
onSkipBackward(android.view.KeyEvent event)
On skip backward key actioned
|
boolean |
onSkipForward(android.view.KeyEvent event)
On skip forward key actioned
|
void |
setVisibility(int visibility)
Sets the button visibility.
|
void |
syncStates()
Implements to update a state (toggle) button to display the correct glyph and
content description for the current managed state value.
|
addListener, addOnceListener, removeListener, removeListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetManagedState, removeListenerspublic static final int DEFAULT_AUDIO_TRACKS_BUTTON_ID
public static final int DEFAULT_CAPTIONS_BUTTON_ID
public static final int DEFAULT_FAST_FORWARD_BUTTON_ID
public static final int DEFAULT_FULL_SCREEN_BUTTON_ID
public static final int DEFAULT_LIVE_BUTTON_ID
public static final int DEFAULT_PLAY_BUTTON_ID
public static final int DEFAULT_REWIND_BUTTON_ID
public static final int DEFAULT_SEEK_BUTTON_ID
protected final java.util.Map<java.lang.String,java.lang.Object> properties
protected final java.util.List<ButtonState> stateList
protected final BaseVideoView videoView
public AbstractButtonController(android.content.Context context,
BaseVideoView videoView,
android.view.View controlBar,
int id,
android.graphics.Typeface font)
context - The given Android application context.videoView - The SDK video view used, possibly, to determine managed state asssociated with the button.controlBar - The layout widget to which the button will be added.id - The Android resource identifier for the button being controlled.@Nullable public android.graphics.Typeface getFont()
@Nullable public android.widget.Button getButton()
getButton in interface ButtonControllerButtonController.getButton()public void setVisibility(int visibility)
visibility - One of View.VISIBLE, View.INVISIBLE, or View.GONE.public EventEmitter getEventEmitter()
getEventEmitter in interface ButtonControllergetEventEmitter in class AbstractComponentButtonController.getEventEmitter()public int getId()
ButtonControllergetId in interface ButtonControllerpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties in interface ButtonControllerButtonController.getProperties()public java.util.List<ButtonState> getStateList()
getStateList in interface ButtonControllerButtonController.getStateList()public int getVisibilityState()
getVisibilityState in interface ButtonControllerButtonController.getVisibilityState()public void syncStates()
syncStates in interface ButtonControllerButtonController.syncStates()public boolean onSkipBackward(android.view.KeyEvent event)
RemoteControlKeyStateonSkipBackward in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onSkipForward(android.view.KeyEvent event)
RemoteControlKeyStateonSkipForward in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onHome(android.view.KeyEvent event)
RemoteControlKeyStateonHome in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onMenu(android.view.KeyEvent event)
RemoteControlKeyStateonMenu in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onBack(android.view.KeyEvent event)
RemoteControlKeyStateonBack in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onRewind(android.view.KeyEvent event)
RemoteControlKeyStateonRewind in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onFastForward(android.view.KeyEvent event)
RemoteControlKeyStateonFastForward in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onPlayPause(android.view.KeyEvent event)
RemoteControlKeyStateonPlayPause in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onPause(android.view.KeyEvent event)
RemoteControlKeyStateonPause in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onPlay(android.view.KeyEvent event)
RemoteControlKeyStateonPlay in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onDpadCenter(android.view.KeyEvent event)
RemoteControlKeyStateonDpadCenter in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onDpadRight(android.view.KeyEvent event)
RemoteControlKeyStateonDpadRight in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onDpadLeft(android.view.KeyEvent event)
RemoteControlKeyStateonDpadLeft in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onDpadDown(android.view.KeyEvent event)
RemoteControlKeyStateonDpadDown in interface RemoteControlKeyStateevent - the android.view.KeyEventpublic boolean onDpadUp(android.view.KeyEvent event)
RemoteControlKeyStateonDpadUp in interface RemoteControlKeyStateevent - the android.view.KeyEvent