Language

AlertDialog コンストラクター

定義

オーバーロード

Name 説明
AlertDialog(Context)

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

AlertDialog(Context, Int32)

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

AlertDialog(IntPtr, JniHandleOwnership)

既存の Java Native Interface オブジェクトのマネージド表現を初期化します。

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

親コンテキスト

属性

注釈

既定のアラート ダイアログ テーマを使用するアラート ダイアログを作成します。 既定のアラート ダイアログ テーマは、親コンテキストのテーマ内で R.attr.alertDialogTheme によって定義されます。

関連項目も参照:

android.app.AlertDialog.AlertDialogの Android リファレンス。

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

適用対象

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、または親0の既定のアラート ダイアログ テーマを使用するcontext

属性

注釈

明示的なテーマ リソースを使用するアラート ダイアログを作成します。 指定したテーマ リソース (themeResId) は、親コンテキストのテーマの上に適用されます。 親コンテキストのテーマ内のすべての属性 (プライマリ色やアクセント カラーを含む) を置き換えるために、R.style.Theme_Material_Dialogなど、完全に設定されたテーマを含むスタイル リソースとして指定できます。 主色やアクセント カラーなどの属性を保持するために、代わりに themeResId をR.style.ThemeOverlay_Material_Dialogなどのオーバーレイ テーマとして指定できます。 これにより、警告ウィンドウのスタイルをダイアログとして設定するために必要なウィンドウ属性のみがオーバーライドされます。 または、親コンテキストの解決された値を R.attr.alertDialogTheme に使用するために、themeResId を 0 として指定することもできます。

関連項目も参照:

android.app.AlertDialog.AlertDialogの Android リファレンス。

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

適用対象

AlertDialog(IntPtr, JniHandleOwnership)

既存の Java Native Interface オブジェクトのマネージド表現を初期化します。

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

パラメーター

javaReference
IntPtr

nativeint

Java ネイティブ インターフェイス オブジェクト参照。

transfer
JniHandleOwnership

Java Native Interface オブジェクト参照に適用する所有権の転送。

注釈

このコンストラクターは、既存のJava オブジェクトのマネージド ピアを作成するときに、Android バインド ランタイムの.NETによって呼び出されます。

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

適用対象

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

boolean

cancelListener
IDialogInterfaceOnCancelListener

DialogInterface.OnCancelListener

属性

注釈

既定のアラート ダイアログ テーマとカスタムキャンセル リスナーを使用するアラート ダイアログを作成します。 これは機能的に同じです。既定のアラート ダイアログ テーマは、親コンテキストのテーマ内で R.attr.alertDialogTheme によって定義されます。

関連項目も参照:

android.app.AlertDialog.AlertDialogの Android リファレンス。

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

適用対象

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

注釈

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

適用対象