View.SetBackgroundResource(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将背景设置为给定资源。
[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 文档。
此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。