android.app
Class Dialog
java.lang.Object
android.app.Dialog
- All Implemented Interfaces:
- DialogInterface, KeyEvent.Callback, View.OnCreateContextMenuListener, Window.Callback
- Direct Known Subclasses:
- AlertDialog, CharacterPickerDialog
public class Dialog
- extends java.lang.Object
- implements DialogInterface, Window.Callback, KeyEvent.Callback, View.OnCreateContextMenuListener
|
Method Summary |
void |
addContentView(View view,
ViewGroup.LayoutParams params)
|
void |
cancel()
|
void |
closeOptionsMenu()
|
void |
dismiss()
|
boolean |
dispatchKeyEvent(KeyEvent event)
|
boolean |
dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
|
boolean |
dispatchTouchEvent(MotionEvent ev)
|
boolean |
dispatchTrackballEvent(MotionEvent ev)
|
View |
findViewById(int id)
|
Context |
getContext()
|
View |
getCurrentFocus()
|
LayoutInflater |
getLayoutInflater()
|
Activity |
getOwnerActivity()
|
int |
getVolumeControlStream()
|
Window |
getWindow()
|
void |
hide()
|
boolean |
isShowing()
|
void |
onAttachedToWindow()
|
void |
onBackPressed()
|
void |
onContentChanged()
|
boolean |
onContextItemSelected(MenuItem item)
|
void |
onContextMenuClosed(Menu menu)
|
protected void |
onCreate(Bundle savedInstanceState)
|
void |
onCreateContextMenu(ContextMenu menu,
View v,
ContextMenu.ContextMenuInfo menuInfo)
|
boolean |
onCreateOptionsMenu(Menu menu)
|
boolean |
onCreatePanelMenu(int featureId,
Menu menu)
|
View |
onCreatePanelView(int featureId)
|
void |
onDetachedFromWindow()
|
boolean |
onKeyDown(int keyCode,
KeyEvent event)
|
boolean |
onKeyLongPress(int keyCode,
KeyEvent event)
|
boolean |
onKeyMultiple(int keyCode,
int repeatCount,
KeyEvent event)
|
boolean |
onKeyUp(int keyCode,
KeyEvent event)
|
boolean |
onMenuItemSelected(int featureId,
MenuItem item)
|
boolean |
onMenuOpened(int featureId,
Menu menu)
|
boolean |
onOptionsItemSelected(MenuItem item)
|
void |
onOptionsMenuClosed(Menu menu)
|
void |
onPanelClosed(int featureId,
Menu menu)
|
boolean |
onPrepareOptionsMenu(Menu menu)
|
boolean |
onPreparePanel(int featureId,
View view,
Menu menu)
|
void |
onRestoreInstanceState(Bundle savedInstanceState)
|
Bundle |
onSaveInstanceState()
|
boolean |
onSearchRequested()
|
protected void |
onStart()
|
protected void |
onStop()
|
boolean |
onTouchEvent(MotionEvent event)
|
boolean |
onTrackballEvent(MotionEvent event)
|
void |
onWindowAttributesChanged(WindowManager.LayoutParams params)
|
void |
onWindowFocusChanged(boolean hasFocus)
|
void |
openContextMenu(View view)
|
void |
openOptionsMenu()
|
void |
registerForContextMenu(View view)
|
boolean |
requestWindowFeature(int featureId)
|
void |
setCancelable(boolean flag)
|
void |
setCanceledOnTouchOutside(boolean cancel)
|
void |
setCancelMessage(Message msg)
|
void |
setContentView(int layoutResID)
|
void |
setContentView(View view)
|
void |
setContentView(View view,
ViewGroup.LayoutParams params)
|
void |
setDismissMessage(Message msg)
|
void |
setFeatureDrawable(int featureId,
Drawable drawable)
|
void |
setFeatureDrawableAlpha(int featureId,
int alpha)
|
void |
setFeatureDrawableResource(int featureId,
int resId)
|
void |
setFeatureDrawableUri(int featureId,
Uri uri)
|
void |
setOnCancelListener(DialogInterface.OnCancelListener listener)
|
void |
setOnDismissListener(DialogInterface.OnDismissListener listener)
|
void |
setOnKeyListener(DialogInterface.OnKeyListener onKeyListener)
|
void |
setOwnerActivity(Activity activity)
|
void |
setTitle(java.lang.CharSequence title)
|
void |
setTitle(int titleId)
|
void |
setVolumeControlStream(int streamType)
|
void |
show()
|
void |
takeKeyEvents(boolean get)
|
void |
unregisterForContextMenu(View view)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Dialog
public Dialog(Context context)
Dialog
public Dialog(Context context,
int theme)
Dialog
protected Dialog(Context context,
boolean cancelable,
DialogInterface.OnCancelListener cancelListener)
getContext
public final Context getContext()
setOwnerActivity
public final void setOwnerActivity(Activity activity)
getOwnerActivity
public final Activity getOwnerActivity()
isShowing
public boolean isShowing()
show
public void show()
hide
public void hide()
dismiss
public void dismiss()
- Specified by:
dismiss in interface DialogInterface
onCreate
protected void onCreate(Bundle savedInstanceState)
onStart
protected void onStart()
onStop
protected void onStop()
onSaveInstanceState
public Bundle onSaveInstanceState()
onRestoreInstanceState
public void onRestoreInstanceState(Bundle savedInstanceState)
getWindow
public Window getWindow()
getCurrentFocus
public View getCurrentFocus()
findViewById
public View findViewById(int id)
setContentView
public void setContentView(int layoutResID)
setContentView
public void setContentView(View view)
setContentView
public void setContentView(View view,
ViewGroup.LayoutParams params)
addContentView
public void addContentView(View view,
ViewGroup.LayoutParams params)
setTitle
public void setTitle(java.lang.CharSequence title)
setTitle
public void setTitle(int titleId)
onKeyDown
public boolean onKeyDown(int keyCode,
KeyEvent event)
- Specified by:
onKeyDown in interface KeyEvent.Callback
onKeyLongPress
public boolean onKeyLongPress(int keyCode,
KeyEvent event)
- Specified by:
onKeyLongPress in interface KeyEvent.Callback
onKeyUp
public boolean onKeyUp(int keyCode,
KeyEvent event)
- Specified by:
onKeyUp in interface KeyEvent.Callback
onKeyMultiple
public boolean onKeyMultiple(int keyCode,
int repeatCount,
KeyEvent event)
- Specified by:
onKeyMultiple in interface KeyEvent.Callback
onBackPressed
public void onBackPressed()
onTouchEvent
public boolean onTouchEvent(MotionEvent event)
onTrackballEvent
public boolean onTrackballEvent(MotionEvent event)
onWindowAttributesChanged
public void onWindowAttributesChanged(WindowManager.LayoutParams params)
- Specified by:
onWindowAttributesChanged in interface Window.Callback
onContentChanged
public void onContentChanged()
- Specified by:
onContentChanged in interface Window.Callback
onWindowFocusChanged
public void onWindowFocusChanged(boolean hasFocus)
- Specified by:
onWindowFocusChanged in interface Window.Callback
onAttachedToWindow
public void onAttachedToWindow()
- Specified by:
onAttachedToWindow in interface Window.Callback
onDetachedFromWindow
public void onDetachedFromWindow()
- Specified by:
onDetachedFromWindow in interface Window.Callback
dispatchKeyEvent
public boolean dispatchKeyEvent(KeyEvent event)
- Specified by:
dispatchKeyEvent in interface Window.Callback
dispatchTouchEvent
public boolean dispatchTouchEvent(MotionEvent ev)
- Specified by:
dispatchTouchEvent in interface Window.Callback
dispatchTrackballEvent
public boolean dispatchTrackballEvent(MotionEvent ev)
- Specified by:
dispatchTrackballEvent in interface Window.Callback
dispatchPopulateAccessibilityEvent
public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event)
- Specified by:
dispatchPopulateAccessibilityEvent in interface Window.Callback
onCreatePanelView
public View onCreatePanelView(int featureId)
- Specified by:
onCreatePanelView in interface Window.Callback
onCreatePanelMenu
public boolean onCreatePanelMenu(int featureId,
Menu menu)
- Specified by:
onCreatePanelMenu in interface Window.Callback
onPreparePanel
public boolean onPreparePanel(int featureId,
View view,
Menu menu)
- Specified by:
onPreparePanel in interface Window.Callback
onMenuOpened
public boolean onMenuOpened(int featureId,
Menu menu)
- Specified by:
onMenuOpened in interface Window.Callback
onMenuItemSelected
public boolean onMenuItemSelected(int featureId,
MenuItem item)
- Specified by:
onMenuItemSelected in interface Window.Callback
onPanelClosed
public void onPanelClosed(int featureId,
Menu menu)
- Specified by:
onPanelClosed in interface Window.Callback
onCreateOptionsMenu
public boolean onCreateOptionsMenu(Menu menu)
onPrepareOptionsMenu
public boolean onPrepareOptionsMenu(Menu menu)
onOptionsItemSelected
public boolean onOptionsItemSelected(MenuItem item)
onOptionsMenuClosed
public void onOptionsMenuClosed(Menu menu)
openOptionsMenu
public void openOptionsMenu()
closeOptionsMenu
public void closeOptionsMenu()
onCreateContextMenu
public void onCreateContextMenu(ContextMenu menu,
View v,
ContextMenu.ContextMenuInfo menuInfo)
- Specified by:
onCreateContextMenu in interface View.OnCreateContextMenuListener
registerForContextMenu
public void registerForContextMenu(View view)
unregisterForContextMenu
public void unregisterForContextMenu(View view)
openContextMenu
public void openContextMenu(View view)
onContextItemSelected
public boolean onContextItemSelected(MenuItem item)
onContextMenuClosed
public void onContextMenuClosed(Menu menu)
onSearchRequested
public boolean onSearchRequested()
- Specified by:
onSearchRequested in interface Window.Callback
takeKeyEvents
public void takeKeyEvents(boolean get)
requestWindowFeature
public final boolean requestWindowFeature(int featureId)
setFeatureDrawableResource
public final void setFeatureDrawableResource(int featureId,
int resId)
setFeatureDrawableUri
public final void setFeatureDrawableUri(int featureId,
Uri uri)
setFeatureDrawable
public final void setFeatureDrawable(int featureId,
Drawable drawable)
setFeatureDrawableAlpha
public final void setFeatureDrawableAlpha(int featureId,
int alpha)
getLayoutInflater
public LayoutInflater getLayoutInflater()
setCancelable
public void setCancelable(boolean flag)
setCanceledOnTouchOutside
public void setCanceledOnTouchOutside(boolean cancel)
cancel
public void cancel()
- Specified by:
cancel in interface DialogInterface
setOnCancelListener
public void setOnCancelListener(DialogInterface.OnCancelListener listener)
setCancelMessage
public void setCancelMessage(Message msg)
setOnDismissListener
public void setOnDismissListener(DialogInterface.OnDismissListener listener)
setDismissMessage
public void setDismissMessage(Message msg)
setVolumeControlStream
public final void setVolumeControlStream(int streamType)
getVolumeControlStream
public final int getVolumeControlStream()
setOnKeyListener
public void setOnKeyListener(DialogInterface.OnKeyListener onKeyListener)
Copyright © 2008-2010. All Rights Reserved.