public override void finish() { if (this._enclosing.mActionMode != this) { // Not the active action mode - no-op return; } // If we were hidden before the mode was shown, defer the onDestroy // callback until the animation is finished and associated relayout // is about to happen. This lets apps better anticipate visibility // and layout behavior. if (this._enclosing.mWasHiddenBeforeMode) { this._enclosing.mDeferredDestroyActionMode = this; this._enclosing.mDeferredModeDestroyCallback = this.mCallback; } else { this.mCallback.onDestroyActionMode(this); } this.mCallback = null; this._enclosing.animateToMode(false); // Clear out the context mode views after the animation finishes this._enclosing.mContextView.closeMode(); this._enclosing.mActionView.sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent .TYPE_WINDOW_STATE_CHANGED); this._enclosing.mActionMode = null; if (this._enclosing.mWasHiddenBeforeMode) { this._enclosing.hide(); } }
public virtual android.view.ActionMode startActionMode(android.view.ActionMode.Callback callback) { bool wasHidden = false; if (mActionMode != null) { wasHidden = mWasHiddenBeforeMode; mActionMode.finish(); } mContextView.killMode(); [email protected] mode = new [email protected] .ActionModeImpl(this, callback); if (mode.dispatchOnCreate()) { mWasHiddenBeforeMode = !isShowing() || wasHidden; mode.invalidate(); mContextView.initForMode(mode); animateToMode(true); if (mSplitView != null && mContextDisplayMode == CONTEXT_DISPLAY_SPLIT) { // TODO animate this mSplitView.setVisibility(android.view.View.VISIBLE); } mContextView.sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent .TYPE_WINDOW_STATE_CHANGED); mActionMode = mode; return(mode); } return(null); }
public ActionModeImpl(ActionBarImpl _enclosing, android.view.ActionMode.Callback callback) { this._enclosing = _enclosing; this.mCallback = callback; this.mMenu = new [email protected](this._enclosing.getThemedContext ()).setDefaultShowAsAction(android.view.MenuItemClass.SHOW_AS_ACTION_IF_ROOM); this.mMenu.setCallback(this); }
internal virtual void completeDeferredDestroyActionMode() { if (mDeferredModeDestroyCallback != null) { mDeferredModeDestroyCallback.onDestroyActionMode(mDeferredDestroyActionMode); mDeferredDestroyActionMode = null; mDeferredModeDestroyCallback = null; } }
public virtual android.view.ActionMode onWindowStartingActionMode(android.view.ActionMode .Callback callback) { throw new System.NotImplementedException(); }
public override android.view.ActionMode startActionModeForChild(android.view.View child, android.view.ActionMode.Callback callback) { // No starting an action mode for an action bar child! (Where would it go?) return(null); }
public override android.view.ActionMode startActionModeForChild(android.view.View child, android.view.ActionMode.Callback callback) { throw new System.NotImplementedException(); }
public StandaloneActionMode(android.content.Context context, [email protected] view, android.view.ActionMode.Callback callback, bool isFocusable) { throw new System.NotImplementedException(); }
public override void finish() { if (this._enclosing.mActionMode != this) { // Not the active action mode - no-op return; } // If we were hidden before the mode was shown, defer the onDestroy // callback until the animation is finished and associated relayout // is about to happen. This lets apps better anticipate visibility // and layout behavior. if (this._enclosing.mWasHiddenBeforeMode) { this._enclosing.mDeferredDestroyActionMode = this; this._enclosing.mDeferredModeDestroyCallback = this.mCallback; } else { this.mCallback.onDestroyActionMode(this); } this.mCallback = null; this._enclosing.animateToMode(false); // Clear out the context mode views after the animation finishes this._enclosing.mContextView.closeMode(); this._enclosing.mActionView.sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent .TYPE_WINDOW_STATE_CHANGED); this._enclosing.mActionMode = null; if (this._enclosing.mWasHiddenBeforeMode) { this._enclosing.hide(); } }
public ActionModeImpl(ActionBarImpl _enclosing, android.view.ActionMode.Callback callback) { this._enclosing = _enclosing; this.mCallback = callback; this.mMenu = new [email protected](this._enclosing.getThemedContext ()).setDefaultShowAsAction(android.view.MenuItemClass.SHOW_AS_ACTION_IF_ROOM); this.mMenu.setCallback(this); }
internal virtual void completeDeferredDestroyActionMode() { if (mDeferredModeDestroyCallback != null) { mDeferredModeDestroyCallback.onDestroyActionMode(mDeferredDestroyActionMode); mDeferredDestroyActionMode = null; mDeferredModeDestroyCallback = null; } }
public ExtractActionMode(ExtractEditLayout _enclosing, android.view.ActionMode.Callback cb) { throw new System.NotImplementedException(); }