| java.lang.Object | ||
| ↳ | android.app.Dialog | |
| ↳ | android.app.AlertDialog | |
Known Direct Subclasses
|
A subclass of Dialog that can display one, two or three buttons. If you only want to display a String in this dialog box, use the setMessage() method. If you want to display a more complex view, look up the FrameLayout called "body" and add your view to it:
FrameLayout fl = (FrameLayout) findViewById(R.id.body); fl.add(myView, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AlertDialog.Builder | |||||||||||
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.content.DialogInterface
| |||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
A key was pressed down.
| |||||||||||
A key was released.
| |||||||||||
Set a listener to be invoked when button 1 of the dialog is pressed.
| |||||||||||
Set a listener to be invoked when button 2 of the dialog is pressed.
| |||||||||||
Set a listener to be invoked when button 3 of the dialog is pressed.
| |||||||||||
Set resId to 0 if you don't want an icon.
| |||||||||||
Set the title text for this dialog's window.
| |||||||||||
Set the view to display in that dialog.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Similar to onCreate(Bundle), you should initialized your dialog
in this method, including calling setContentView(View).
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class android.app.Dialog
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface android.content.DialogInterface
| |||||||||||
From interface android.view.KeyEvent.Callback
| |||||||||||
From interface android.view.View.OnCreateContextMenuListener
| |||||||||||
From interface android.view.Window.Callback
| |||||||||||
A key was pressed down.
If the focused view didn't want this event, this method is called.
The default implementation handles KEYCODE_BACK to close the dialog.
| keyCode | The value in event.getKeyCode(). |
|---|---|
| event | Description of the key event. |
A key was released.
| keyCode | The value in event.getKeyCode(). |
|---|---|
| event | Description of the key event. |
Set a listener to be invoked when button 1 of the dialog is pressed.
| text | The text to display in button 1. |
|---|---|
| listener | The DialogInterface.OnClickListener to use. |
Set a listener to be invoked when button 2 of the dialog is pressed.
| text | The text to display in button 2. |
|---|---|
| listener | The DialogInterface.OnClickListener to use. |
Set a listener to be invoked when button 3 of the dialog is pressed.
| text | The text to display in button 3. |
|---|---|
| listener | The DialogInterface.OnClickListener to use. |
Set resId to 0 if you don't want an icon.
| resId | the resourceId of the drawable to use as the icon or 0 if you don't want an icon. |
|---|
Set the title text for this dialog's window.
| title | The new text to display in the title. |
|---|
Set the view to display in that dialog.
Similar to onCreate(Bundle), you should initialized your dialog in this method, including calling setContentView(View).
| savedInstanceState | If this dialog is being reinitalized after a the hosting activity was previously shut down, holds the result from the most recent call to onSaveInstanceState(), or null if this is the first time. |
|---|