Class MyContextsDialog

  • All Implemented Interfaces:
    android.content.DialogInterface, android.view.KeyEvent.Callback, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback, ContextListener

    public class MyContextsDialog
    extends android.app.Dialog
    implements ContextListener
    A dialog class implementation for the "My contexts" example.
    See Also:
    MyContexts
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  MyContextsDialog.myContextAdapter  
      • Nested classes/interfaces inherited from interface android.content.DialogInterface

        android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener
    • Field Summary

      • Fields inherited from interface android.content.DialogInterface

        BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE
    • Constructor Summary

      Constructors 
      Constructor Description
      MyContextsDialog​(android.app.Activity activity, java.util.ArrayList<Context> myContexts)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contextChanged​(boolean active)
      This method is called when context active value changed.
      void onCreate​(android.os.Bundle savedInstanceState)  
      void onStart()  
      void onStop()  
      • Methods inherited from class android.app.Dialog

        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, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, requireViewById, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface android.view.Window.Callback

        onPointerCaptureChanged, onProvideKeyboardShortcuts
    • Constructor Detail

      • MyContextsDialog

        public MyContextsDialog​(android.app.Activity activity,
                                java.util.ArrayList<Context> myContexts)
    • Method Detail

      • onCreate

        public void onCreate​(android.os.Bundle savedInstanceState)
        Overrides:
        onCreate in class android.app.Dialog
      • onStart

        public void onStart()
        Overrides:
        onStart in class android.app.Dialog
      • onStop

        public void onStop()
        Overrides:
        onStop in class android.app.Dialog
      • contextChanged

        public void contextChanged​(boolean active)
        Description copied from interface: ContextListener
        This method is called when context active value changed.
        Specified by:
        contextChanged in interface ContextListener
        Parameters:
        active - the context active value