public virtual android.view.View getContentView() { if (this._enclosing.mLocalActivityManager == null) { throw new System.InvalidOperationException("Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?" ); } android.view.Window w = this._enclosing.mLocalActivityManager.startActivity(this. mTag, this.mIntent); android.view.View wd = w != null?w.getDecorView() : null; if (this.mLaunchedView != wd && this.mLaunchedView != null) { if (this.mLaunchedView.getParent() != null) { this._enclosing.mTabContent.removeView(this.mLaunchedView); } } this.mLaunchedView = wd; // XXX Set FOCUS_AFTER_DESCENDANTS on embedded activities for now so they can get // focus if none of their children have it. They need focus to be able to // display menu items. // // Replace this with something better when Bug 628886 is fixed... // if (this.mLaunchedView != null) { this.mLaunchedView.setVisibility(android.view.View.VISIBLE); this.mLaunchedView.setFocusableInTouchMode(true); ((android.view.ViewGroup) this.mLaunchedView).setDescendantFocusability(android.view.ViewGroup .FOCUS_AFTER_DESCENDANTS); } return(this.mLaunchedView); }
public ActionBarImpl(android.app.Activity activity) { mHideListener = new _AnimatorListenerAdapter_108(this); mShowListener = new _AnimatorListenerAdapter_125(this); mActivity = activity; android.view.Window window = activity.getWindow(); android.view.View decor = window.getDecorView(); init(decor); if (!mActivity.getWindow().hasFeature(android.view.Window.FEATURE_ACTION_BAR_OVERLAY )) { mContentView = decor.findViewById(android.R.id.content); } }
public virtual bool onKey(android.content.DialogInterface dialog, int keyCode, android.view.KeyEvent @event) { if (keyCode == android.view.KeyEvent.KEYCODE_MENU || keyCode == android.view.KeyEvent .KEYCODE_BACK) { if (@event.getAction() == android.view.KeyEvent.ACTION_DOWN && @event.getRepeatCount () == 0) { android.view.Window win = mDialog.getWindow(); if (win != null) { android.view.View decor = win.getDecorView(); if (decor != null) { android.view.KeyEvent.DispatcherState ds = decor.getKeyDispatcherState(); if (ds != null) { ds.startTracking(@event, this); return(true); } } } } else { if (@event.getAction() == android.view.KeyEvent.ACTION_UP && [email protected]()) { android.view.Window win = mDialog.getWindow(); if (win != null) { android.view.View decor = win.getDecorView(); if (decor != null) { android.view.KeyEvent.DispatcherState ds = decor.getKeyDispatcherState(); if (ds != null && ds.isTracking(@event)) { mMenu.close(true); dialog.dismiss(); return(true); } } } } } } // Menu shortcut matching return(mMenu.performShortcut(keyCode, @event, 0)); }