Interface IToaster

All Known Subinterfaces:
IAppSessionGyro, IClientSessionGyro
All Known Implementing Classes:
AppSessionGyro, ClientSessionGyro
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IToaster
The toast API is available for both IClientSessionGyro (the device) and IAppSessionGyro (the session). It basically exposes one toast method that, when called with proper arguments, instantly displays a small, unobstructive and ephemeral message to the user.
Author:
Thomas Schreiber
  • Field Details

  • Method Details

    • toast

      default void toast(String message)
      Displays a simple, unobstructive and ephemeral text message to the user.

      The toast is displayed to at Position.BOTTOM_CENTER, with an animation Direction.UP and Type.MESSAGE.

      Parameters:
      message - The message to display.
    • toast

      default void toast(KString message)
      Displays a simple, unobstructive and ephemeral text message to the user.

      The toast is displayed to at Position.BOTTOM_CENTER, with an animation Direction.UP and Type.MESSAGE.

      Parameters:
      message - The message to display.
    • toast

      default void toast(String message, IToaster.Type type)
      Displays a simple, unobstructive and ephemeral text message to the user.

      The toast is displayed to at Position.BOTTOM_CENTER, with an animation Direction.UP.

      Parameters:
      message - The message to display.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
    • toast

      default void toast(KString message, IToaster.Type type)
      Displays a simple, unobstructive and ephemeral text message to the user.

      The toast is displayed to at Position.BOTTOM_CENTER, with an animation Direction.UP.

      Parameters:
      message - The message to display.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
    • toast

      default void toast(String message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type)
      Displays a simple, unobstructive and ephemeral text message to the user.
      Parameters:
      message - The message to display.
      position - Position of toast, default value is Position.BOTTOM_CENTER if position is null.
      direction - Direction of the toast animation, default Direction.UP if direction is null.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
    • toast

      default void toast(KString message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type)
      Displays a simple, unobstructive and ephemeral text message to the user.
      Parameters:
      message - The message to display.
      position - Position of toast, default value is Position.BOTTOM_CENTER if position is null.
      direction - Direction of the toast animation, default Direction.UP if direction is null.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
    • toast

      default void toast(String message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type, int duration)
      Displays a simple, unobstructive and ephemeral text message to the user.
      Parameters:
      message - The message to display.
      position - Position of toast, default value is Position.BOTTOM_CENTER if position is null.
      direction - Direction of the toast animation, default Direction.UP if direction is null.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
      duration - Duration of the toast message being shown in ms. Valid values are in the interval [0, 10000], 0 for a sticky toast.
    • toast

      void toast(KString message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type, int duration)
      Displays a simple, unobstructive and ephemeral text message to the user.
      Parameters:
      message - The message to display.
      position - Position of toast, default value is Position.BOTTOM_CENTER if position is null.
      direction - Direction of the toast animation, default Direction.UP if direction is null.
      type - Type of message style: MESSAGE, WARNING, ERROR or FATAL, default is MESSAGE if type is null.
      duration - Duration of the toast message being shown in ms. Valid values are in the interval [0, 10000], 0 for a sticky toast.