|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.app.Dialog
com.wimm.framework.app.AlertDialog
public class AlertDialog
A Dialog
that can display one, two or three buttons.
Use this class instead of Android's AlertDialog
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface android.content.DialogInterface |
---|
DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener |
Field Summary |
---|
Fields inherited from interface android.content.DialogInterface |
---|
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3 |
Constructor Summary | |
---|---|
AlertDialog(Context context)
|
Method Summary | |
---|---|
void |
setButton(CharSequence text,
DialogInterface.OnClickListener listener)
Set a listener to be invoked when the positive button is pressed. |
void |
setButton(CharSequence text,
Message msg)
Set a message to be sent when the positive button is pressed. |
void |
setButton(int whichButton,
CharSequence text,
DialogInterface.OnClickListener listener)
Set a listener to be invoked when a button is pressed. |
void |
setButton(int whichButton,
CharSequence text,
Message msg)
Set a message to be sent when a button is pressed. |
void |
setCancelable(boolean flag)
Sets whether the dialog is cancelable or not. |
void |
setMessage(CharSequence message)
Set the message to display in the dialog. |
void |
setMessage(int messageId)
Set the message to display in the dialog. |
void |
setTitle(CharSequence title)
Set the title to display in the dialog. |
void |
setTitle(int titleId)
Set the title to display in the dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlertDialog(Context context)
Method Detail |
---|
public void setTitle(int titleId)
setTitle
in class Dialog
titleId
- The resource id of the title to display in the dialog.public void setTitle(CharSequence title)
setTitle
in class Dialog
title
- The title to display in the dialog.public void setMessage(int messageId)
messageId
- The resource id of the message to display in the dialog.public void setMessage(CharSequence message)
message
- The message to display in the dialog.public void setCancelable(boolean flag)
setCancelable
in class Dialog
public void setButton(CharSequence text, DialogInterface.OnClickListener listener)
text
- The text to display in the button.listener
- The DialogInterface.OnClickListener
to use when the button is clicked.public void setButton(CharSequence text, Message msg)
text
- The text to display in the button.msg
- The Message
to be sent when the button is clicked.public void setButton(int whichButton, CharSequence text, DialogInterface.OnClickListener listener)
whichButton
- Which button to set the listener on, can be one of
DialogInterface.BUTTON_POSITIVE
,
DialogInterface.BUTTON_NEGATIVE
, or
DialogInterface.BUTTON_NEUTRAL
text
- The text to display in the button.listener
- The DialogInterface.OnClickListener
to use when the button is clicked.public void setButton(int whichButton, CharSequence text, Message msg)
whichButton
- Which button to set the message for, can be one of
DialogInterface.BUTTON_POSITIVE
,
DialogInterface.BUTTON_NEGATIVE
, or
DialogInterface.BUTTON_NEUTRAL
text
- The text to display in the button.msg
- The Message
to be sent when the button is clicked.
|
WIMM Labs |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |