DatePickerDialog Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DatePickerDialog(Context) |
Creates a new date picker dialog for the current date using the parent context's default date picker dialog theme. |
| DatePickerDialog(Context, Int32) |
Creates a new date picker dialog for the current date. |
| DatePickerDialog(IntPtr, JniHandleOwnership) |
Initializes a managed representation of an existing Java Native Interface object. |
| DatePickerDialog(Context, DatePickerDialog+IOnDateSetListener, Int32, Int32, Int32) |
Creates a new date picker dialog for the specified date using the parent context's default date picker dialog theme. |
| DatePickerDialog(Context, EventHandler<DatePickerDialog.DateSetEventArgs>, Int32, Int32, Int32) | |
| DatePickerDialog(Context, Int32, DatePickerDialog+IOnDateSetListener, Int32, Int32, Int32) |
Creates a new date picker dialog for the specified date. |
| DatePickerDialog(Context, Int32, EventHandler<DatePickerDialog.DateSetEventArgs>, Int32, Int32, Int32) |
DatePickerDialog(Context)
Creates a new date picker dialog for the current date using the parent context's default date picker dialog theme.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=24)]
public DatePickerDialog(Android.Content.Context context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "", ApiSince=24)>]
new Android.App.DatePickerDialog : Android.Content.Context -> Android.App.DatePickerDialog
Parameters
- context
- Context
the parent context
- Attributes
Remarks
Creates a new date picker dialog for the current date using the parent context's default date picker dialog theme.
Android reference for android.app.DatePickerDialog.DatePickerDialog.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(Context, Int32)
Creates a new date picker dialog for the current date.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "", ApiSince=24)]
public DatePickerDialog(Android.Content.Context context, int themeResId);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;I)V", "", ApiSince=24)>]
new Android.App.DatePickerDialog : Android.Content.Context * int -> Android.App.DatePickerDialog
Parameters
- context
- Context
the parent context
- themeResId
- Int32
the resource ID of the theme against which to inflate
this dialog, or 0 to use the parent
context's default alert dialog theme
- Attributes
Remarks
Creates a new date picker dialog for the current date.
Android reference for android.app.DatePickerDialog.DatePickerDialog.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(IntPtr, JniHandleOwnership)
Initializes a managed representation of an existing Java Native Interface object.
protected DatePickerDialog(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.App.DatePickerDialog : nativeint * Android.Runtime.JniHandleOwnership -> Android.App.DatePickerDialog
Parameters
- javaReference
-
IntPtr
nativeint
The Java Native Interface object reference.
- transfer
- JniHandleOwnership
The ownership transfer to apply to the Java Native Interface object reference.
Remarks
This constructor is called by the .NET for Android binding runtime when it creates a managed peer for an existing Java object.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(Context, DatePickerDialog+IOnDateSetListener, Int32, Int32, Int32)
Creates a new date picker dialog for the specified date using the parent context's default date picker dialog theme.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/app/DatePickerDialog$OnDateSetListener;III)V", "")]
public DatePickerDialog(Android.Content.Context context, Android.App.DatePickerDialog.IOnDateSetListener? listener, int year, int month, int dayOfMonth);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/app/DatePickerDialog$OnDateSetListener;III)V", "")>]
new Android.App.DatePickerDialog : Android.Content.Context * Android.App.DatePickerDialog.IOnDateSetListener * int * int * int -> Android.App.DatePickerDialog
Parameters
- context
- Context
Context: the parent context. This value cannot be null.
- listener
- DatePickerDialog.IOnDateSetListener
DatePickerDialog.OnDateSetListener: the listener to call when the user sets the date. This value may be null.
- year
- Int32
int: the initially selected year
- month
- Int32
int: the initially selected month (0-11 for compatibility with Calendar.MONTH)
- dayOfMonth
- Int32
int: the initially selected day of month (1-31, depending on month)
- Attributes
Remarks
Creates a new date picker dialog for the specified date using the parent context's default date picker dialog theme.
Android reference for android.app.DatePickerDialog.DatePickerDialog.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(Context, EventHandler<DatePickerDialog.DateSetEventArgs>, Int32, Int32, Int32)
public DatePickerDialog(Android.Content.Context context, EventHandler<Android.App.DatePickerDialog.DateSetEventArgs> callBack, int year, int monthOfYear, int dayOfMonth);
new Android.App.DatePickerDialog : Android.Content.Context * EventHandler<Android.App.DatePickerDialog.DateSetEventArgs> * int * int * int -> Android.App.DatePickerDialog
Parameters
- context
- Context
- year
- Int32
- monthOfYear
- Int32
- dayOfMonth
- Int32
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(Context, Int32, DatePickerDialog+IOnDateSetListener, Int32, Int32, Int32)
Creates a new date picker dialog for the specified date.
[Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/app/DatePickerDialog$OnDateSetListener;III)V", "")]
public DatePickerDialog(Android.Content.Context context, int themeResId, Android.App.DatePickerDialog.IOnDateSetListener? listener, int year, int monthOfYear, int dayOfMonth);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;ILandroid/app/DatePickerDialog$OnDateSetListener;III)V", "")>]
new Android.App.DatePickerDialog : Android.Content.Context * int * Android.App.DatePickerDialog.IOnDateSetListener * int * int * int -> Android.App.DatePickerDialog
Parameters
- context
- Context
Context: the parent context. This value cannot be null.
- themeResId
- Int32
int: the resource ID of the theme against which to inflate this dialog, or 0 to use the parent context's default alert dialog theme
- listener
- DatePickerDialog.IOnDateSetListener
DatePickerDialog.OnDateSetListener: the listener to call when the user sets the date. This value may be null.
- year
- Int32
int: the initially selected year
- monthOfYear
- Int32
int: the initially selected month of the year (0-11 for compatibility with Calendar.MONTH)
- dayOfMonth
- Int32
int: the initially selected day of month (1-31, depending on month)
- Attributes
Remarks
Creates a new date picker dialog for the specified date.
Android reference for android.app.DatePickerDialog.DatePickerDialog.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
DatePickerDialog(Context, Int32, EventHandler<DatePickerDialog.DateSetEventArgs>, Int32, Int32, Int32)
public DatePickerDialog(Android.Content.Context context, int theme, EventHandler<Android.App.DatePickerDialog.DateSetEventArgs> callBack, int year, int monthOfYear, int dayOfMonth);
new Android.App.DatePickerDialog : Android.Content.Context * int * EventHandler<Android.App.DatePickerDialog.DateSetEventArgs> * int * int * int -> Android.App.DatePickerDialog
Parameters
- context
- Context
- theme
- Int32
- year
- Int32
- monthOfYear
- Int32
- dayOfMonth
- Int32
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.