AlertDialog コンストラクター
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
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、または 0
親 context
の既定のアラート ダイアログ テーマを使用する場合
- 属性
注釈
明示的なテーマ リソースを使用するアラート ダイアログを作成します。
指定したテーマ リソース (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
パラメーター
- 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
- cancelListener
- IDialogInterfaceOnCancelListener
- 属性
注釈
の 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
注釈
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。