AlertDialog コンストラクター

定義

オーバーロード

AlertDialog(Context)

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。

AlertDialog(Context, Int32)

明示的なテーマ リソースを使用するアラート ダイアログを作成します。

AlertDialog(IntPtr, JniHandleOwnership)

JNI オブジェクトのマネージド表現を作成するときに使用されるコンストラクター。ランタイムによって呼び出されます。

AlertDialog(Context, Boolean, IDialogInterfaceOnCancelListener)

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。

AlertDialog(Context, Boolean, EventHandler)

AlertDialog(Context)

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
protected AlertDialog (Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.App.AlertDialog : Android.Content.Context -> Android.App.AlertDialog

パラメーター

context
Context

親コンテキスト

属性

注釈

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。

既定のアラート ダイアログ テーマは、親contextのテーマ内で によってandroid.R.attr#alertDialogTheme定義されます。

の Java ドキュメント android.app.AlertDialog.AlertDialog(android.content.Context)

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

AlertDialog(Context, Int32)

明示的なテーマ リソースを使用するアラート ダイアログを作成します。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")]
protected AlertDialog (Android.Content.Context? context, int themeResId);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "")>]
new Android.App.AlertDialog : Android.Content.Context * int -> Android.App.AlertDialog

パラメーター

context
Context

親コンテキスト

themeResId
Int32

このダイアログを拡張するテーマのリソース ID、または 0contextの既定のアラート ダイアログ テーマを使用する場合

属性

注釈

明示的なテーマ リソースを使用するアラート ダイアログを作成します。

指定したテーマ リソース (themeResId) は、親 contextのテーマの上に適用されます。 プライマリとアクセントの色を含む親contextのテーマ内のすべての属性を置き換えるために、 などのandroid.R.style#Theme_Material_Dialog完全に設定されたテーマを含むスタイル リソースとして指定できます。

主色やアクセント色などの属性を保持するために、 themeResId などのオーバーレイ テーマ android.R.style#ThemeOverlay_Material_Dialogとして を指定することもできます。 これにより、アラート ウィンドウのスタイルをダイアログとして設定するために必要なウィンドウ属性のみがオーバーライドされます。

または、 にthemeResId対して親contextの解決された値android.R.attr#alertDialogThemeを使用するように を指定0することもできます。

の Java ドキュメント android.app.AlertDialog.AlertDialog(android.content.Context, int)

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

AlertDialog(IntPtr, JniHandleOwnership)

JNI オブジェクトのマネージド表現を作成するときに使用されるコンストラクター。ランタイムによって呼び出されます。

protected AlertDialog (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.AlertDialog : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.AlertDialog

パラメーター

javaReference
IntPtr

nativeint

IntPtrJava Native Interface (JNI) オブジェクト参照を含む 。

transfer
JniHandleOwnership

処理方法を示す 。JniHandleOwnershipjavaReference

注釈

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

AlertDialog(Context, Boolean, IDialogInterfaceOnCancelListener)

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ZLandroid/content/DialogInterface$OnCancelListener;)V", "")]
protected AlertDialog (Android.Content.Context? context, bool cancelable, Android.Content.IDialogInterfaceOnCancelListener? cancelListener);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ZLandroid/content/DialogInterface$OnCancelListener;)V", "")>]
new Android.App.AlertDialog : Android.Content.Context * bool * Android.Content.IDialogInterfaceOnCancelListener -> Android.App.AlertDialog

パラメーター

context
Context

親コンテキスト

cancelable
Boolean
属性

注釈

の Java ドキュメント android.app.AlertDialog.AlertDialog(android.content.Context)

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象

AlertDialog(Context, Boolean, EventHandler)

protected AlertDialog (Android.Content.Context context, bool cancelable, EventHandler cancelHandler);
new Android.App.AlertDialog : Android.Content.Context * bool * EventHandler -> Android.App.AlertDialog

パラメーター

context
Context
cancelable
Boolean
cancelHandler
EventHandler

注釈

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象