DreamService.SetContentView Method

Definition

Overloads

SetContentView(View)

Sets a view to be the content view for this Dream.

SetContentView(Int32)

Inflates a layout resource and set it to be the content view for this Dream.

SetContentView(View, ViewGroup+LayoutParams)

Inflates a layout resource and set it to be the content view for this Dream.

SetContentView(View)

Sets a view to be the content view for this Dream.

[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
Attributes

Remarks

Sets a view to be the content view for this Dream. Behaves similarly to android.app.Activity#setContentView(android.view.View) in an activity, including using ViewGroup.LayoutParams#MATCH_PARENT as the layout height and width of the view.

Note: This requires a window, so you should usually call it during #onAttachedToWindow() and never earlier (you <strong>cannot</strong> call it during #onCreate).

Java documentation for android.service.dreams.DreamService.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

  • SetContentView(Int32)
  • <xref:Android.Service.Dreams.DreamService.SetContentView(Android.Views.View%2c+.LayoutParams)>

Applies to

SetContentView(Int32)

Inflates a layout resource and set it to be the content view for this Dream.

[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

Inflates a layout resource and set it to be the content view for this Dream. Behaves similarly to android.app.Activity#setContentView(int).

Note: Requires a window, do not call before #onAttachedToWindow()

Java documentation for android.service.dreams.DreamService.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

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

Applies to

SetContentView(View, ViewGroup+LayoutParams)

Inflates a layout resource and set it to be the content view for this Dream.

[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.service.dreams.DreamService.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