Resources.GetColorStateList 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetColorStateList(Int32) |
傳回與特定資源標識符相關聯的色彩狀態清單。 |
GetColorStateList(Int32, Resources+Theme) |
傳回與特定資源標識符相關聯的色彩狀態清單。 |
GetColorStateList(Int32)
傳回與特定資源標識符相關聯的色彩狀態清單。
[Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "GetGetColorStateList_IHandler")]
public virtual Android.Content.Res.ColorStateList GetColorStateList (int id);
[<Android.Runtime.Register("getColorStateList", "(I)Landroid/content/res/ColorStateList;", "GetGetColorStateList_IHandler")>]
abstract member GetColorStateList : int -> Android.Content.Res.ColorStateList
override this.GetColorStateList : int -> Android.Content.Res.ColorStateList
參數
- id
- Int32
所需的資源標識碼 ColorStateList
,如 aapt 工具所產生。 這個整數會編碼封裝、類型和資源專案。 值 0 是無效的識別碼。
傳回
ColorStateList 物件,其中包含可以根據狀態選取的單一純色或多個色彩。
- 屬性
例外狀況
如果指定的標識碼不存在,則會擲回 NotFoundException。
備註
傳回與特定資源標識符相關聯的色彩狀態清單。 資源可能包含單一原始色彩值或包含多個可能色彩的複 ColorStateList
本。
已取代這個成員。 請改用 #getColorStateList(int, Theme)
。
的 android.content.res.Resources.getColorStateList(int)
Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
GetColorStateList(Int32, Resources+Theme)
傳回與特定資源標識符相關聯的色彩狀態清單。
[Android.Runtime.Register("getColorStateList", "(ILandroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;", "GetGetColorStateList_ILandroid_content_res_Resources_Theme_Handler", ApiSince=23)]
public virtual Android.Content.Res.ColorStateList GetColorStateList (int id, Android.Content.Res.Resources.Theme? theme);
[<Android.Runtime.Register("getColorStateList", "(ILandroid/content/res/Resources$Theme;)Landroid/content/res/ColorStateList;", "GetGetColorStateList_ILandroid_content_res_Resources_Theme_Handler", ApiSince=23)>]
abstract member GetColorStateList : int * Android.Content.Res.Resources.Theme -> Android.Content.Res.ColorStateList
override this.GetColorStateList : int * Android.Content.Res.Resources.Theme -> Android.Content.Res.ColorStateList
參數
- id
- Int32
所需的資源標識碼 ColorStateList
,如 aapt 工具所產生。 這個整數會編碼封裝、類型和資源專案。 值 0 是無效的識別碼。
- theme
- Resources.Theme
傳回
ColorStateList 物件,其中包含可以根據狀態選取的單一純色或多個色彩。
- 屬性
備註
的 android.content.res.Resources.getColorStateList(int)
Java 檔。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。