public abstract class SafetyWarningDialog extends SystemUIDialog implements DialogInterface.OnDismissListener, DialogInterface.OnClickListener
AlertDialog.Builder
DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener, DialogInterface.OnShowListener
LAYOUT_HINT_NONE, LAYOUT_HINT_SIDE, THEME_DEVICE_DEFAULT_DARK, THEME_DEVICE_DEFAULT_LIGHT, THEME_HOLO_DARK, THEME_HOLO_LIGHT, THEME_TRADITIONAL
mCancelable
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3
Constructor and Description |
---|
SafetyWarningDialog(Context context,
AudioManager audioManager) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
cleanUp() |
void |
onClick(DialogInterface dialog,
int which)
This method will be invoked when a button in the dialog is clicked.
|
void |
onDismiss(DialogInterface unused)
This method will be invoked when the dialog is dismissed.
|
boolean |
onKeyDown(int keyCode,
KeyEvent event)
A key was pressed down.
|
boolean |
onKeyUp(int keyCode,
KeyEvent event)
A key was released.
|
protected void |
onStart()
Called when the dialog is starting.
|
applyFlags, setMessage, setNegativeButton, setPositiveButton, setShowForAllUsers, setShowForAllUsers
getButton, getListView, onCreate, setButton, setButton, setButton, setButton, setButton2, setButton2, setButton3, setButton3, setCustomTitle, setIcon, setIcon, setIconAttribute, setInverseBackgroundForced, setMessage, setTitle, setView, setView
addContentView, cancel, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowDismissed, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setVolumeControlStream, show, takeCancelAndDismissListeners, takeKeyEvents, unregisterForContextMenu
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancel, dismiss
onProvideKeyboardShortcuts
public SafetyWarningDialog(Context context, AudioManager audioManager)
protected abstract void cleanUp()
public boolean onKeyDown(int keyCode, KeyEvent event)
Dialog
If the focused view didn't want this event, this method is called.
The default implementation consumed the KEYCODE_BACK to later
handle it in Dialog.onKeyUp(int, android.view.KeyEvent)
.
onKeyDown
in interface KeyEvent.Callback
onKeyDown
in class AlertDialog
keyCode
- The value in event.getKeyCode().event
- Description of the key event.Dialog.onKeyUp(int, android.view.KeyEvent)
,
KeyEvent
public boolean onKeyUp(int keyCode, KeyEvent event)
Dialog
The default implementation handles KEYCODE_BACK to close the dialog.
onKeyUp
in interface KeyEvent.Callback
onKeyUp
in class AlertDialog
keyCode
- The value in event.getKeyCode().event
- Description of the key event.Dialog.onKeyDown(int, android.view.KeyEvent)
,
KeyEvent
public void onClick(DialogInterface dialog, int which)
DialogInterface.OnClickListener
onClick
in interface DialogInterface.OnClickListener
dialog
- The dialog that received the click.which
- The button that was clicked (e.g.
DialogInterface.BUTTON1
) or the position
of the item clicked.protected void onStart()
Dialog
public void onDismiss(DialogInterface unused)
DialogInterface.OnDismissListener
onDismiss
in interface DialogInterface.OnDismissListener
unused
- The dialog that was dismissed will be passed into the
method.