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)); }
public AlertController(android.content.Context context, android.content.DialogInterface di, android.view.Window window) { mButtonHandler = new _OnClickListener_129(this); mContext = context; mDialogInterface = di; mWindow = window; mHandler = new [email protected](di); android.content.res.TypedArray a = context.obtainStyledAttributes(null, [email protected] .styleable.AlertDialog, [email protected], 0); mAlertDialogLayout = a.getResourceId([email protected]_layout , [email protected]_dialog); mListLayout = a.getResourceId([email protected]_listLayout , [email protected]_dialog); mMultiChoiceItemLayout = a.getResourceId([email protected]_multiChoiceItemLayout , [email protected]_dialog_multichoice); mSingleChoiceItemLayout = a.getResourceId([email protected]_singleChoiceItemLayout , [email protected]_dialog_singlechoice); mListItemLayout = a.getResourceId([email protected]_listItemLayout , [email protected]_dialog_item); a.recycle(); }
public virtual void onConfigureWindow(android.view.Window win, bool isFullscreen, bool isCandidatesOnly) { throw new System.NotImplementedException(); }
internal void attach(android.content.Context context, android.app.ActivityThread aThread, android.app.Instrumentation instr, android.os.IBinder token, int ident, android.app.Application application, android.content.Intent intent, android.content.pm.ActivityInfo info, java.lang.CharSequence title, android.app.Activity parent, string id, android.app.Activity .NonConfigurationInstances lastNonConfigurationInstances, android.content.res.Configuration config) { attachBaseContext(context); mFragments.attachActivity(this); mWindow = [email protected](this); mWindow.setCallback(this); mWindow.getLayoutInflater().setPrivateFactory(this); if (info.softInputMode != android.view.WindowManagerClass.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED) { mWindow.setSoftInputMode(info.softInputMode); } if (info.uiOptions != 0) { mWindow.setUiOptions(info.uiOptions); } mUiThread = java.lang.Thread.currentThread(); mMainThread = aThread; mInstrumentation = instr; mToken = token; mIdent = ident; mApplication = application; mIntent = intent; mComponent = intent.getComponent(); mActivityInfo = info; mTitle = title; mParent = parent; mEmbeddedID = id; mLastNonConfigurationInstances = lastNonConfigurationInstances; mWindow.setWindowManager(null, mToken, mComponent.flattenToString(), (info.flags & android.content.pm.ActivityInfo.FLAG_HARDWARE_ACCELERATED) != 0); if (mParent != null) { mWindow.setContainer(mParent.getWindow()); } mWindowManager = mWindow.getWindowManager(); mCurrentConfig = config; }
/// <summary>Set the container for this window.</summary> /// <remarks> /// Set the container for this window. If not set, the DecorWindow /// operates as a top-level window; otherwise, it negotiates with the /// container to display itself appropriately. /// </remarks> /// <param name="container">The desired containing Window.</param> public virtual void setContainer(android.view.Window container) { mContainer = container; if (container != null) { // Embedded screens never have a title. mFeatures |= 1 << FEATURE_NO_TITLE; mLocalFeatures |= 1 << FEATURE_NO_TITLE; container.mHasChildren = true; } }