Package totalcross.notification
Class Notification.Builder
- java.lang.Object
-
- totalcross.notification.Notification.Builder
-
- Enclosing class:
- Notification
public static class Notification.Builder extends java.lang.ObjectBuilder 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 Notificationbuild()Combine all of the options that have been set and return a new Notification object.Notification.Buildertext(java.lang.CharSequence text)Set the second line of text (the content of the notification) in the platform notification template.Notification.Buildertitle(java.lang.CharSequence title)Set the first line of text (usually properly emphasized as a title) in the platform notification template.
-
-
-
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:
-
-