Android Guides | Samples

Android.App.Activity.SetContentView Method

Set the activity content from a layout resource.

Syntax

[Android.Runtime.Register("setContentView", "(I)V", "GetSetContentView_IHandler")]
public virtual Void SetContentView (Int32 layoutResID)

See Also

Parameters

layoutResID
Resource ID to be inflated.

Remarks

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

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1