Window.SetContentView Method

Definition

Overloads

SetContentView(View)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) set the screen content to an explicit view.

SetContentView(Int32)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) to set the screen content from a layout resource.

SetContentView(View, ViewGroup+LayoutParams)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) to set the screen content from a layout resource.

SetContentView(View)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) set the screen content to an explicit view.

[Android.Runtime.Register("setContentView", "(Landroid/view/View;)V", "GetSetContentView_Landroid_view_View_Handler")]
public abstract 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

Parameters

view
View

The desired content to display.

Attributes

Remarks

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) 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 hierarhcy.

Java documentation for android.view.Window.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.

See also

  • <xref:Android.Views.Window.SetContentView(Android.Views.View%2c+.LayoutParams)>

Applies to

SetContentView(Int32)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) to set the screen content from a layout resource.

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

Parameters

layoutResID
Int32

Resource ID to be inflated.

Attributes

Remarks

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) to 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.view.Window.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.

See also

  • <xref:Android.Views.Window.SetContentView(Android.Views.View%2c+.LayoutParams)>

Applies to

SetContentView(View, ViewGroup+LayoutParams)

Convenience for #setContentView(View, android.view.ViewGroup.LayoutParams) to 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 abstract 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

Parameters

view
View

The desired content to display.

params
ViewGroup.LayoutParams

Layout parameters for the view.

Attributes

Remarks

Java documentation for android.view.Window.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.

See also

Applies to