WIMM Labs


com.wimm.framework.app
Class AlertDialog

java.lang.Object
  extended by android.app.Dialog
      extended by com.wimm.framework.app.AlertDialog
All Implemented Interfaces:
DialogInterface, KeyEvent.Callback, View.OnCreateContextMenuListener, Window.Callback

public class AlertDialog
extends Dialog

A Dialog that can display one, two or three buttons.

Use this class instead of Android's AlertDialog.

Since:
WIMM SDK 1.0.1

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 android.app.Dialog
addContentView, cancel, closeOptionsMenu, dismiss, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getVolumeControlStream, getWindow, hide, isShowing, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOwnerActivity, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertDialog

public AlertDialog(Context context)
Method Detail

setTitle

public void setTitle(int titleId)
Set the title to display in the dialog.

Overrides:
setTitle in class Dialog
Parameters:
titleId - The resource id of the title to display in the dialog.
Since:
WIMM SDK 1.0.1

setTitle

public void setTitle(CharSequence title)
Set the title to display in the dialog.

Overrides:
setTitle in class Dialog
Parameters:
title - The title to display in the dialog.
Since:
WIMM SDK 1.0.1

setMessage

public void setMessage(int messageId)
Set the message to display in the dialog.

Parameters:
messageId - The resource id of the message to display in the dialog.
Since:
WIMM SDK 1.0.1

setMessage

public void setMessage(CharSequence message)
Set the message to display in the dialog.

Parameters:
message - The message to display in the dialog.
Since:
WIMM SDK 1.0.1

setCancelable

public void setCancelable(boolean flag)
Sets whether the dialog is cancelable or not. Default is false.

Overrides:
setCancelable in class Dialog
Since:
WIMM SDK 1.0.1

setButton

public void setButton(CharSequence text,
                      DialogInterface.OnClickListener listener)
Set a listener to be invoked when the positive button is pressed.

Parameters:
text - The text to display in the button.
listener - The DialogInterface.OnClickListener to use when the button is clicked.
Since:
WIMM SDK 1.0.1

setButton

public void setButton(CharSequence text,
                      Message msg)
Set a message to be sent when the positive button is pressed.

Parameters:
text - The text to display in the button.
msg - The Message to be sent when the button is clicked.
Since:
WIMM SDK 1.0.1

setButton

public void setButton(int whichButton,
                      CharSequence text,
                      DialogInterface.OnClickListener listener)
Set a listener to be invoked when a button is pressed.

Parameters:
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.
Since:
WIMM SDK 1.0.1

setButton

public void setButton(int whichButton,
                      CharSequence text,
                      Message msg)
Set a message to be sent when a button is pressed.

Parameters:
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.
Since:
WIMM SDK 1.0.1

WIMM Labs