- All Superinterfaces:
- All Known Implementing Classes:
public interface ButtonController extends AccessibilityListener
Defines the interface for managing a media control button which uses an icon fontset to present the button operation via a glyph defined by the font. Each button can have one or more states (a toggle button has two states) where each state is represented by a different glyph (text) on the button face. Each button state can be backed (managed) by business logic of some sort.
Method SummaryModifier and TypeMethodDescription
android.widget.ButtonObtains the managed button from the controller.Obtains the event emitter used to set up the controllers SDK event handling.
getId()Obtains the Android resource id for the button being controlled.
intObtains the managed state information.Obtains a set of property values (name/value pairs) to emit as an optional part of handling a button action.Obtain the list of button states for the button being controlled.
intObtains the visibility state maintained for the button.
voidRemoves any listeners set up by this button controller.
voidEnsures that the controlled button is in sync with the managed state it represents.
getManagedStateint getManagedState()Obtains the managed state information.
getVisibilityStateint getVisibilityState()Obtains the visibility state maintained for the button. This is the state which the button will be assigned on a configuration change or on an Activity restart.
- The expected visibility state, one of View.GONE, View.INVISIBLE or View.VISIBLE.
getButtonandroid.widget.Button getButton()Obtains the managed button from the controller.
- null if the controller is not managing an Android Button widget, the managed button otherwise.
getIdint getId()Obtains the Android resource id for the button being controlled.
- -1 if the controller is not managing an valid Android button, the resource id otherwise.
getStateListObtain the list of button states for the button being controlled.
- a non-null but possibly empty list of button states for the controlled button.
getPropertiesObtains a set of property values (name/value pairs) to emit as an optional part of handling a button action.
getEventEmitterEventEmitter getEventEmitter()Obtains the event emitter used to set up the controllers SDK event handling.
- a non-null SDK event emitter.
removeListenersvoid removeListeners()Removes any listeners set up by this button controller.
syncStatesvoid syncStates()Ensures that the controlled button is in sync with the managed state it represents.