public virtual void show() { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this ._enclosing.getContext()); if (this.mPrompt != null) { builder.setTitle(this.mPrompt); } this.mPopup = builder.setSingleChoiceItems(this.mListAdapter, this._enclosing.getSelectedItemPosition (), this).show(); }
protected override void onPrepareDialogBuilder(android.app.AlertDialog.Builder arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.preference.ListPreference._onPrepareDialogBuilder6819, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.preference.ListPreference.staticClass, global::android.preference.ListPreference._onPrepareDialogBuilder6819, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
/// <summary>Shows menu as a dialog.</summary> /// <remarks>Shows menu as a dialog.</remarks> /// <param name="windowToken">Optional token to assign to the window.</param> public virtual void show(android.os.IBinder windowToken) { // Many references to mMenu, create local reference [email protected] menu = mMenu; // Get the builder for the dialog android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(menu .getContext()); mPresenter = new [email protected](builder.getContext (), [email protected]_menu_item_layout); mPresenter.setCallback(this); mMenu.addMenuPresenter(mPresenter); builder.setAdapter(mPresenter.getAdapter(), this); // Set the title android.view.View headerView = menu.getHeaderView(); if (headerView != null) { // Menu's client has given a custom header view, use it builder.setCustomTitle(headerView); } else { // Otherwise use the (text) title and icon builder.setIcon(menu.getHeaderIcon()).setTitle(menu.getHeaderTitle()); } // Set the key listener builder.setOnKeyListener(this); // Show the menu mDialog = builder.create(); mDialog.setOnDismissListener(this); android.view.WindowManagerClass.LayoutParams lp = mDialog.getWindow().getAttributes (); lp.type = android.view.WindowManagerClass.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; if (windowToken != null) { lp.token = windowToken; } lp.flags |= android.view.WindowManagerClass.LayoutParams.FLAG_ALT_FOCUSABLE_IM; mDialog.show(); }
/// <summary>Shows menu as a dialog.</summary> /// <remarks>Shows menu as a dialog.</remarks> /// <param name="windowToken">Optional token to assign to the window.</param> public virtual void show(android.os.IBinder windowToken) { // Many references to mMenu, create local reference [email protected] menu = mMenu; // Get the builder for the dialog android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(menu .getContext()); mPresenter = new [email protected](builder.getContext (), [email protected]_menu_item_layout); mPresenter.setCallback(this); mMenu.addMenuPresenter(mPresenter); builder.setAdapter(mPresenter.getAdapter(), this); // Set the title android.view.View headerView = menu.getHeaderView(); if (headerView != null) { // Menu's client has given a custom header view, use it builder.setCustomTitle(headerView); } else { // Otherwise use the (text) title and icon builder.setIcon(menu.getHeaderIcon()).setTitle(menu.getHeaderTitle()); } // Set the key listener builder.setOnKeyListener(this); // Show the menu mDialog = builder.create(); mDialog.setOnDismissListener(this); android.view.WindowManagerClass.LayoutParams lp = mDialog.getWindow().getAttributes (); lp.type = android.view.WindowManagerClass.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; if (windowToken != null) { lp.token = windowToken; } lp.flags |= android.view.WindowManagerClass.LayoutParams.FLAG_ALT_FOCUSABLE_IM; mDialog.show(); }
static void Show(android.app.Activity activity, string text, System.Action <DialogResult> onClick) { activity.runOnUiThread(((java.lang.Runnable.Delegate)(() => { var dlg = new android.app.AlertDialog.Builder(activity); dlg.setPositiveButton((java.lang.CharSequence)(object) "Close", ((android.content.DialogInterface.OnClickListener.Delegate) ((dialog, which) => { Showing = false; onClick(DialogResult.Yes); } )).AsInterface()); dlg.setOnDismissListener( ((android.content.DialogInterface.OnDismissListener.Delegate) ((dialog) => { Showing = false; onClick(DialogResult.Cancel); } )).AsInterface()); dlg.create(); dlg.setMessage((java.lang.CharSequence)(object) text); Showing = true; dlg.show(); })).AsInterface()); }
public virtual void show() { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this ._enclosing.getContext()); if (this.mPrompt != null) { builder.setTitle(this.mPrompt); } this.mPopup = builder.setSingleChoiceItems(this.mListAdapter, this._enclosing.getSelectedItemPosition (), this).show(); }