public class TileButtonDialog
extends java.lang.Object
implements android.content.DialogInterface.OnDismissListener, android.view.View.OnClickListener
Modifier and Type | Class and Description |
---|---|
class |
TileButtonDialog.TileButton |
Modifier and Type | Field and Description |
---|---|
static int |
WHICH_CANCEL |
Constructor and Description |
---|
TileButtonDialog(MapView mapView) |
TileButtonDialog(MapView mapView,
boolean persistent) |
TileButtonDialog(MapView mapView,
android.content.Context plugin) |
TileButtonDialog(MapView mapView,
android.content.Context plugin,
boolean bPersistent) |
TileButtonDialog(MapView mapView,
android.content.Context context,
android.content.Context plugin,
boolean bPersistent)
Instantiates a Plugin Context friendly variant of the TileButtonDialog.
|
Modifier and Type | Method and Description |
---|---|
TileButtonDialog.TileButton |
addButton(android.graphics.drawable.Drawable icon,
java.lang.String text)
Add a button to the dialog
|
TileButtonDialog.TileButton |
addButton(int iconId,
int textId)
Add a button to the dialog
|
TileButtonDialog |
addButton(TileButtonDialog.TileButton addButton) |
TileButtonDialog.TileButton |
createButton(android.graphics.drawable.Drawable icon,
java.lang.String text)
Creates a button for adding to the TileButton dialog
|
boolean |
dismiss() |
void |
onClick(android.view.View v) |
void |
onDismiss(android.content.DialogInterface dialog) |
void |
removeButton(TileButtonDialog.TileButton removeButton) |
TileButtonDialog |
setCancelText(int txtId,
java.lang.Object... args) |
TileButtonDialog |
setCancelText(java.lang.String txt)
Set the cancel button text
|
TileButtonDialog |
setCustomView(android.view.View v)
Set a custom view to be displayed between the message and buttons
|
TileButtonDialog |
setIcon(android.graphics.drawable.Drawable icon) |
TileButtonDialog |
setIcon(int iconId) |
TileButtonDialog |
setMessage(int msgId,
java.lang.Object... args) |
TileButtonDialog |
setMessage(java.lang.String message)
Set the message displayed above the buttons
|
TileButtonDialog |
setOnCancelListener(android.content.DialogInterface.OnCancelListener onCancel) |
TileButtonDialog |
setOnClickListener(android.content.DialogInterface.OnClickListener onClick) |
TileButtonDialog |
setTitle(int titleId,
java.lang.Object... args) |
TileButtonDialog |
setTitle(java.lang.String title)
Set the title of this dialog
|
void |
show() |
void |
show(boolean showCancel) |
void |
show(int titleId) |
void |
show(int titleId,
boolean showCancel) |
void |
show(int titleId,
int msgId) |
void |
show(int titleId,
int msgId,
boolean showCancel) |
void |
show(java.lang.String title,
java.lang.String message) |
void |
show(java.lang.String title,
java.lang.String message,
boolean showCancel) |
void |
show(java.lang.String title,
java.lang.String message,
boolean showCancel,
java.lang.String cancelTitle) |
public static final int WHICH_CANCEL
public TileButtonDialog(MapView mapView)
public TileButtonDialog(MapView mapView, boolean persistent)
public TileButtonDialog(MapView mapView, android.content.Context plugin)
public TileButtonDialog(MapView mapView, android.content.Context plugin, boolean bPersistent)
public TileButtonDialog(MapView mapView, android.content.Context context, android.content.Context plugin, boolean bPersistent)
mapView
- Map view instancecontext
- Activity context (usually MapView#getContext()
)plugin
- Plugin context used for looking up string and icon resourcesbPersistent
- True if the dialog should stay open when a tile
button is pressed. The buttons act as toggles instead.public TileButtonDialog setTitle(java.lang.String title)
title
- Titlepublic TileButtonDialog setTitle(int titleId, java.lang.Object... args)
public TileButtonDialog setMessage(java.lang.String message)
message
- Messagepublic TileButtonDialog setMessage(int msgId, java.lang.Object... args)
public TileButtonDialog setCancelText(java.lang.String txt)
txt
- Cancel textpublic TileButtonDialog setCancelText(int txtId, java.lang.Object... args)
public TileButtonDialog setCustomView(android.view.View v)
v
- Viewpublic TileButtonDialog.TileButton createButton(android.graphics.drawable.Drawable icon, java.lang.String text)
icon
- Icon drawabletext
- Button textpublic TileButtonDialog.TileButton addButton(android.graphics.drawable.Drawable icon, java.lang.String text)
icon
- Icon drawabletext
- Text string (null to hide)public TileButtonDialog.TileButton addButton(int iconId, int textId)
iconId
- Icon drawable resource ID (plugin context)textId
- Text string resource ID (plugin context, 0 to hide)public TileButtonDialog addButton(TileButtonDialog.TileButton addButton)
public void removeButton(TileButtonDialog.TileButton removeButton)
public TileButtonDialog setOnClickListener(android.content.DialogInterface.OnClickListener onClick)
public TileButtonDialog setOnCancelListener(android.content.DialogInterface.OnCancelListener onCancel)
public TileButtonDialog setIcon(android.graphics.drawable.Drawable icon)
public TileButtonDialog setIcon(int iconId)
public void show(boolean showCancel)
public void show()
public void show(java.lang.String title, java.lang.String message, boolean showCancel, java.lang.String cancelTitle)
public void show(java.lang.String title, java.lang.String message, boolean showCancel)
public void show(java.lang.String title, java.lang.String message)
public void show(int titleId, int msgId, boolean showCancel)
public void show(int titleId, int msgId)
public void show(int titleId, boolean showCancel)
public void show(int titleId)
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
public boolean dismiss()
public void onDismiss(android.content.DialogInterface dialog)
onDismiss
in interface android.content.DialogInterface.OnDismissListener