Window.SetBackgroundDrawableResource(Int32) Method

Definition

Change the background of this window to a Drawable resource.

[Android.Runtime.Register("setBackgroundDrawableResource", "(I)V", "GetSetBackgroundDrawableResource_IHandler")]
public virtual void SetBackgroundDrawableResource (int resId);
[<Android.Runtime.Register("setBackgroundDrawableResource", "(I)V", "GetSetBackgroundDrawableResource_IHandler")>]
abstract member SetBackgroundDrawableResource : int -> unit
override this.SetBackgroundDrawableResource : int -> unit

Parameters

resId
Int32

The resource identifier of a drawable resource which will be installed as the new background.

Attributes

Remarks

Change the background of this window to a Drawable resource. Setting the background to null will make the window be opaque. To make the window transparent, you can use an empty drawable (for instance a ColorDrawable with the color 0 or the system drawable android:drawable/empty.)

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