AlertDialog.Builder.SetView Method
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 |
|---|---|
| SetView(Int32) |
Set a custom view resource to be the contents of the Dialog. |
| SetView(View) |
Sets a custom view to be the contents of the alert dialog. |
SetView(Int32)
Set a custom view resource to be the contents of the Dialog.
[Android.Runtime.Register("setView", "(I)Landroid/app/AlertDialog$Builder;", "GetSetView_IHandler")]
public virtual Android.App.AlertDialog.Builder SetView(int layoutResId);
[<Android.Runtime.Register("setView", "(I)Landroid/app/AlertDialog$Builder;", "GetSetView_IHandler")>]
abstract member SetView : int -> Android.App.AlertDialog.Builder
override this.SetView : int -> Android.App.AlertDialog.Builder
Parameters
- layoutResId
- Int32
int: Resource ID to be inflated.
Returns
this Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
Set a custom view resource to be the contents of the Dialog. The resource will be inflated, adding all top-level views to the screen.
Android reference for android.app.AlertDialog.Builder.setView.
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
SetView(View)
Sets a custom view to be the contents of the alert dialog.
[Android.Runtime.Register("setView", "(Landroid/view/View;)Landroid/app/AlertDialog$Builder;", "GetSetView_Landroid_view_View_Handler")]
public virtual Android.App.AlertDialog.Builder SetView(Android.Views.View view);
[<Android.Runtime.Register("setView", "(Landroid/view/View;)Landroid/app/AlertDialog$Builder;", "GetSetView_Landroid_view_View_Handler")>]
abstract member SetView : Android.Views.View -> Android.App.AlertDialog.Builder
override this.SetView : Android.Views.View -> Android.App.AlertDialog.Builder
Parameters
- view
- View
View: the view to use as the contents of the alert dialog
Returns
this Builder object to allow for chaining of calls to set methods
- Attributes
Remarks
Sets a custom view to be the contents of the alert dialog. When using a pre-Holo theme, if the supplied view is an instance of a ListView then the light background will be used. Note: To ensure consistent styling, the custom view should be inflated or constructed using the alert dialog's themed context obtained via getContext().
Android reference for android.app.AlertDialog.Builder.setView.
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.