Context.GetColorStateList(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回与特定资源 ID 关联的颜色状态列表,并为当前主题设置样式。
[Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "", ApiSince=23)]
public Android.Content.Res.ColorStateList GetColorStateList (int id);
[<Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "", ApiSince=23)>]
member this.GetColorStateList : int -> Android.Content.Res.ColorStateList
参数
- id
- Int32
所需的资源标识符,由 aapt 工具生成。 此整数对包、类型和资源条目进行编码。 值 0 是无效的标识符。
返回
颜色状态列表。
- 属性
注解
返回与特定资源 ID 关联的颜色状态列表,并为当前主题设置样式。
适用于 . 的 android.content.Context.getColorStateList(int)
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。