Condividi tramite


Dialog.SetContentView Method

Definition

Overloads

SetContentView(View)

Set the screen content to an explicit view.

SetContentView(Int32)

Set the screen content from a layout resource.

SetContentView(View, ViewGroup+LayoutParams)

Set the screen content from a layout resource.

SetContentView(View)

Set the screen content to an explicit view.

[Android.Runtime.Register("setContentView", "(Landroid/view/View;)V", "GetSetContentView_Landroid_view_View_Handler")]
public virtual void SetContentView (Android.Views.View view);
[<Android.Runtime.Register("setContentView", "(Landroid/view/View;)V", "GetSetContentView_Landroid_view_View_Handler")>]
abstract member SetContentView : Android.Views.View -> unit
override this.SetContentView : Android.Views.View -> unit

Parameters

view
View

The desired content to display.

Attributes

Remarks

Set the screen content to an explicit view. This view is placed directly into the screen's view hierarchy. It can itself be a complex view hierarchy.

Java documentation for android.app.Dialog.setContentView(android.view.View).

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

SetContentView(Int32)

Set the screen content from a layout resource.

[Android.Runtime.Register("setContentView", "(I)V", "GetSetContentView_IHandler")]
public virtual void SetContentView (int layoutResID);
[<Android.Runtime.Register("setContentView", "(I)V", "GetSetContentView_IHandler")>]
abstract member SetContentView : int -> unit
override this.SetContentView : int -> unit

Parameters

layoutResID
Int32

Resource ID to be inflated.

Attributes

Remarks

Set the screen content from a layout resource. The resource will be inflated, adding all top-level views to the screen.

Java documentation for android.app.Dialog.setContentView(int).

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

SetContentView(View, ViewGroup+LayoutParams)

Set the screen content from a layout resource.

[Android.Runtime.Register("setContentView", "(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V", "GetSetContentView_Landroid_view_View_Landroid_view_ViewGroup_LayoutParams_Handler")]
public virtual void SetContentView (Android.Views.View view, Android.Views.ViewGroup.LayoutParams? params);
[<Android.Runtime.Register("setContentView", "(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V", "GetSetContentView_Landroid_view_View_Landroid_view_ViewGroup_LayoutParams_Handler")>]
abstract member SetContentView : Android.Views.View * Android.Views.ViewGroup.LayoutParams -> unit
override this.SetContentView : Android.Views.View * Android.Views.ViewGroup.LayoutParams -> unit

Parameters

view
View

The desired content to display.

params
ViewGroup.LayoutParams

Layout parameters for the view.

Attributes

Remarks

Java documentation for android.app.Dialog.setContentView(int).

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