Interface ButtonController

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      android.widget.Button getButton()
      Obtains the managed button from the controller.
      EventEmitter getEventEmitter()
      Obtains the event emitter used to set up the controllers SDK event handling.
      int getId()
      Obtains the Android resource id for the button being controlled.
      int getManagedState()
      Obtains the managed state information.
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      Obtains a set of property values (name/value pairs) to emit as an optional part of handling a button action.
      java.util.List<ButtonState> getStateList()
      Obtain the list of button states for the button being controlled.
      int getVisibilityState()
      Obtains the visibility state maintained for the button.
      void removeListeners()
      Removes any listeners set up by this button controller.
      void syncStates()
      Ensures that the controlled button is in sync with the managed state it represents.
    • Method Detail

      • getManagedState

        int getManagedState()
        Obtains the managed state information.
      • getVisibilityState

        int 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.
        Returns:
        The expected visibility state, one of View.GONE, View.INVISIBLE or View.VISIBLE.
      • getButton

        android.widget.Button getButton()
        Obtains the managed button from the controller.
        Returns:
        null if the controller is not managing an Android Button widget, the managed button otherwise.
      • getId

        int getId()
        Obtains the Android resource id for the button being controlled.
        Returns:
        -1 if the controller is not managing an valid Android button, the resource id otherwise.
      • getStateList

        java.util.List<ButtonState> getStateList()
        Obtain the list of button states for the button being controlled.
        Returns:
        a non-null but possibly empty list of button states for the controlled button.
      • getProperties

        java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        Obtains a set of property values (name/value pairs) to emit as an optional part of handling a button action.
      • getEventEmitter

        EventEmitter getEventEmitter()
        Obtains the event emitter used to set up the controllers SDK event handling.
        Returns:
        a non-null SDK event emitter.
      • removeListeners

        void removeListeners()
        Removes any listeners set up by this button controller.
      • syncStates

        void syncStates()
        Ensures that the controlled button is in sync with the managed state it represents.