java.lang.Object | |
↳ | com.pdftron.pdf.utils.CommonToast |
Toast decorator allowing for easy cancellation of notifications. Use this class if you want subsequent Toast notifications to overwrite current ones.
By default, a current CommonToast notification will be cancelled by a subsequent notification. This default behaviour can be changed by calling certain methods like show(boolean).Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | CommonToast.CommonToastHandler | ||||||||||
interface | CommonToast.CommonToastListener |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
cancel()
Close the view if it's showing, or don't show it if it isn't showing yet.
| ||||||||||
void |
show()
Show the view for the specified duration.
| ||||||||||
void |
show(boolean cancelCurrent)
Show the view for the specified duration.
| ||||||||||
static void |
showText(Context context, CharSequence text, int duration)
Show a standard CommonToast that just contains a text view.
| ||||||||||
static void | showText(Context context, CharSequence text, int duration, int gravity, int xOffset, int yOffset) | ||||||||||
static void |
showText(Context context, int resId)
Show a standard CommonToast that just contains a text view with the text from a resource.
| ||||||||||
static void |
showText(Context context, CharSequence text)
Show a standard CommonToast that just contains a text view.
| ||||||||||
static void | showText(Context context, int resId, int duration, int gravity, int xOffset, int yOffset) | ||||||||||
static void |
showText(Context context, int resId, int duration)
Show a standard CommonToast that just contains a text view with the text from a resource.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Close the view if it's showing, or don't show it if it isn't showing yet. You do not normally have to call this. Normally view will disappear on its own after the appropriate duration.
Show the view for the specified duration. By default, this method cancels any current
notification to immediately display the new one. For conventional Toast.show()
queueing behaviour, use method show(boolean)
.
Show the view for the specified duration. This method can be used to cancel the current notification, or to queue up notifications.
cancelCurrent | true to cancel any current notification and replace it with this new
one |
---|
Show a standard CommonToast that just contains a text view.
Show a standard CommonToast that just contains a text view with the text from a resource. Duration defaults to Toast.LENGTH_SHORT.
if the resource can't be found. | |
Resources.NotFoundException |
Show a standard CommonToast that just contains a text view. Duration defaults to Toast.LENGTH_SHORT.
Resources.NotFoundException |
---|
Show a standard CommonToast that just contains a text view with the text from a resource.
if the resource can't be found. | |
Resources.NotFoundException |