public final class Notifier extends AndroidNonvisibleComponent implements Component
form
ACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF
Constructor and Description |
---|
Notifier(ComponentContainer container)
Creates a new Notifier component.
|
Modifier and Type | Method and Description |
---|---|
void |
AfterChoosing(java.lang.String choice)
Event after the user has made a selection for ShowChooseDialog.
|
void |
AfterTextInput(java.lang.String response)
Event raised after the user has responded to ShowTextDialog.
|
void |
BackgroundColor(int argb)
Specifies the alert's background color.
|
void |
DismissProgressDialog()
Dismisses the alert created by the ShowProgressDialog block
|
void |
HideKeyboard(android.view.View view)
Hide soft keyboard after user either enters text or cancels.
|
void |
LogError(java.lang.String message)
Log an error message.
|
void |
LogInfo(java.lang.String message)
Log an information message.
|
void |
LogWarning(java.lang.String message)
Log a warning message.
|
int |
NotifierLength() |
void |
NotifierLength(int length)
Specifies the length of time that the alert is shown -- either "short" or "long".
|
static void |
oneButtonAlert(android.app.Activity activity,
java.lang.String message,
java.lang.String title,
java.lang.String buttonText) |
void |
progressDialog(java.lang.String message,
java.lang.String title)
This method creates the actual ProgressDialog.
|
void |
ShowAlert(java.lang.String notice)
Display a temporary notification
|
void |
ShowChooseDialog(java.lang.String message,
java.lang.String title,
java.lang.String button1Text,
java.lang.String button2Text,
boolean cancelable)
Displays an alert with two buttons that have specified text.
|
void |
ShowMessageDialog(java.lang.String message,
java.lang.String title,
java.lang.String buttonText)
Display an alert dialog with a single button that dismisses the alert.
|
void |
ShowProgressDialog(java.lang.String message,
java.lang.String title)
Display a progress dialog that cannot be dismissed by the user.
|
void |
ShowTextDialog(java.lang.String message,
java.lang.String title,
boolean cancelable)
Shows a dialog box in which the user can enter text, after which the
AfterTextInput event is raised.
|
int |
TextColor()
Returns the alert's text color.
|
void |
TextColor(int argb)
Specifies the alert's text color.
|
static void |
twoButtonDialog(android.app.Activity activity,
java.lang.String message,
java.lang.String title,
java.lang.String button1Text,
java.lang.String button2Text,
boolean cancelable,
java.lang.Runnable positiveAction,
java.lang.Runnable negativeAction,
java.lang.Runnable cancelAction) |
getDispatchDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDispatchDelegate
public Notifier(ComponentContainer container)
container
- the enclosing componentpublic void ShowProgressDialog(java.lang.String message, java.lang.String title)
message
- the text in the alert boxtitle
- the title for the alert boxpublic void DismissProgressDialog()
public void progressDialog(java.lang.String message, java.lang.String title)
message
- the message for the dialogtitle
- the title for the dialogpublic void ShowMessageDialog(java.lang.String message, java.lang.String title, java.lang.String buttonText)
message
- the text in the alert boxtitle
- the title for the alert boxbuttonText
- the text on the buttonpublic static void oneButtonAlert(android.app.Activity activity, java.lang.String message, java.lang.String title, java.lang.String buttonText)
public void ShowChooseDialog(java.lang.String message, java.lang.String title, java.lang.String button1Text, java.lang.String button2Text, boolean cancelable)
message
- the text in the alert boxtitle
- the title for the alert boxbutton1Text
- the text on the left-hand buttonbutton2Text
- the text on the right-hand buttoncancelable
- indicates if additional CANCEL button should be addedpublic static void twoButtonDialog(android.app.Activity activity, java.lang.String message, java.lang.String title, java.lang.String button1Text, java.lang.String button2Text, boolean cancelable, java.lang.Runnable positiveAction, java.lang.Runnable negativeAction, java.lang.Runnable cancelAction)
public void AfterChoosing(java.lang.String choice)
choice
- is the text on the button the user pressedpublic void ShowTextDialog(java.lang.String message, java.lang.String title, boolean cancelable)
message
- the text in the alert boxtitle
- the title for the alert boxcancelable
- indicates whether the user should be able to cancel out of dialog.
When true, an additional CANCEL button will be added allowing user to cancel
out of dialog. If selected, it will raise AfterTextInput with text of CANCEL.public void HideKeyboard(android.view.View view)
public void AfterTextInput(java.lang.String response)
response
- is the text that was enteredpublic void ShowAlert(java.lang.String notice)
notice
- the text of the notificationpublic void NotifierLength(int length)
length
- Length of time that an alert is visiblepublic int NotifierLength()
public void BackgroundColor(int argb)
argb
- background RGB color with alphapublic int TextColor()
public void TextColor(int argb)
argb
- text RGB color with alphapublic void LogError(java.lang.String message)
message
- the error messagepublic void LogWarning(java.lang.String message)
message
- the warning messagepublic void LogInfo(java.lang.String message)
message
- the information message