Package com.iizix.gyro
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 IToasterThe 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
 
- Nested Class Summary- Nested Classes - Modifier and Type - Interface - Description - static class- IToaster.DirectionDefinition of the direction for the show animation.- static class- IToaster.PositionDefinition of the available position where to display the toast.- static class- IToaster.TypeType of message style: message, warning, error of fatal.
 - Field Summary- Fields - Modifier and Type - Field - Description - static int- TOASTER_DEFAULT_DURATION- static int- TOASTER_MAX_DURATION- static int- TOASTER_MIN_DURATION
 - Method Summary- All Methods Instance Methods Abstract Methods Default Methods - Modifier and Type - Method - Description - default void- toast(KString message)Displays a simple, unobstructive and ephemeral text message to the user.- 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.- 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.- default void- toast(KString message, IToaster.Type type)Displays a simple, unobstructive and ephemeral text message to the user.- default void- toast(java.lang.String message)Displays a simple, unobstructive and ephemeral text message to the user.- default void- toast(java.lang.String message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type)Displays a simple, unobstructive and ephemeral text message to the user.- default void- toast(java.lang.String message, IToaster.Position position, IToaster.Direction direction, IToaster.Type type, int duration)Displays a simple, unobstructive and ephemeral text message to the user.- default void- toast(java.lang.String message, IToaster.Type type)Displays a simple, unobstructive and ephemeral text message to the user.
 
- Field Detail- TOASTER_DEFAULT_DURATION- static final int TOASTER_DEFAULT_DURATION - See Also:
- Constant Field Values
 
 - TOASTER_MAX_DURATION- static final int TOASTER_MAX_DURATION - See Also:
- Constant Field Values
 
 - TOASTER_MIN_DURATION- static final int TOASTER_MIN_DURATION - See Also:
- Constant Field Values
 
 
 - Method Detail- toast- default void toast(java.lang.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(java.lang.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(java.lang.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(java.lang.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.