View.SetBackgroundResource(Int32) 方法

定义

将背景设置为给定资源。

[Android.Runtime.Register("setBackgroundResource", "(I)V", "GetSetBackgroundResource_IHandler")]
public virtual void SetBackgroundResource (int resid);
[<Android.Runtime.Register("setBackgroundResource", "(I)V", "GetSetBackgroundResource_IHandler")>]
abstract member SetBackgroundResource : int -> unit
override this.SetBackgroundResource : int -> unit

参数

resid
Int32

资源的标识符。

属性

注解

将背景设置为给定资源。 资源应引用 Drawable 对象或 0 以删除背景。

android.view.View.setBackgroundResource(int)Java 文档。

此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。

适用于