Class Notification.Builder

  • Enclosing class:
    Notification

    public static class Notification.Builder
    extends java.lang.Object
    Builder class for Notification objects.

    Example:

     Notification notification = new Notification.Builder()
                    .setTitle("Here's an important notification!")
                    .setText(subject)
                    .build();
     
    Since:
    TotalCross 4.2.0
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Notification build()
      Combine all of the options that have been set and return a new Notification object.
      Notification.Builder text​(java.lang.CharSequence text)
      Set the second line of text (the content of the notification) in the platform notification template.
      Notification.Builder title​(java.lang.CharSequence title)
      Set the first line of text (usually properly emphasized as a title) in the platform notification template.
      • Methods inherited from class java.lang.Object

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

      • Builder

        public Builder()
    • Method Detail

      • build

        public Notification build()
        Combine all of the options that have been set and return a new Notification object.
        Returns:
        a new Notification object
      • title

        public Notification.Builder title​(java.lang.CharSequence title)
        Set the first line of text (usually properly emphasized as a title) in the platform notification template.
        Parameters:
        title -
        Returns:
      • text

        public Notification.Builder text​(java.lang.CharSequence text)
        Set the second line of text (the content of the notification) in the platform notification template.
        Parameters:
        text -
        Returns: