Object ButtonsAPI

  • All Implemented Interfaces:

    
    public class ButtonsAPI
    
                        

    Adds methods for creating button components

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class ButtonsAPI.ButtonData

      Stores data about a button

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static ButtonsAPI INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Unit addButton(Message $self, ButtonsAPI.ButtonData button) Creates a button with the given data
      final static Unit addButton(Message $self, String label, ButtonStyle style, Function2<Message, FragmentActivity, Unit> onPress) Adds a button component to the message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • addButton

         final static Unit addButton(Message $self, ButtonsAPI.ButtonData button)

        Creates a button with the given data

        Parameters:
        button - The data to create the button with
      • addButton

         final static Unit addButton(Message $self, String label, ButtonStyle style, Function2<Message, FragmentActivity, Unit> onPress)

        Adds a button component to the message.

        Parameters:
        label - The label of the button.
        style - The style of the button.
        onPress - Callback for when the button is pressed, passing the message as an argument.