IAttributeSet.GetAttributeResourceValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| GetAttributeResourceValue(Int32, Int32) |
回傳 'index' 處屬性的值作為資源識別碼。 |
| GetAttributeResourceValue(String, String, Int32) |
回傳「屬性」的值作為資源識別碼。 |
GetAttributeResourceValue(Int32, Int32)
回傳 'index' 處屬性的值作為資源識別碼。
[Android.Runtime.Register("getAttributeResourceValue", "(II)I", "GetGetAttributeResourceValue_IIHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetAttributeResourceValue(int index, int defaultValue);
[<Android.Runtime.Register("getAttributeResourceValue", "(II)I", "GetGetAttributeResourceValue_IIHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeResourceValue : int * int -> int
參數
- index
- Int32
目標屬性的索引,0...count-1。
- defaultValue
- Int32
如果找不到該屬性該回傳什麼。
傳回
結果價值。
- 屬性
備註
回傳 'index' 處屬性的值作為資源識別碼。
請注意,這與 #getAttributeNameResource 它回傳此屬性中包含的值作為資源識別碼(即原本形式為「」的值)不同
Java 文件 android.util.AttributeSet.getAttributeResourceValue(int, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
GetAttributeResourceValue(String, String, Int32)
回傳「屬性」的值作為資源識別碼。
[Android.Runtime.Register("getAttributeResourceValue", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetGetAttributeResourceValue_Ljava_lang_String_Ljava_lang_String_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public int GetAttributeResourceValue(string? namespace, string? attribute, int defaultValue);
[<Android.Runtime.Register("getAttributeResourceValue", "(Ljava/lang/String;Ljava/lang/String;I)I", "GetGetAttributeResourceValue_Ljava_lang_String_Ljava_lang_String_IHandler:Android.Util.IAttributeSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeResourceValue : string * string * int -> int
參數
- namespace
- String
要取回屬性的命名空間。
- attribute
- String
要取回的屬性。
- defaultValue
- Int32
如果找不到該屬性該回傳什麼。
傳回
結果價值。
- 屬性
備註
回傳「屬性」的值作為資源識別碼。
請注意,這與 #getAttributeNameResource 它回傳此屬性中包含的值作為資源識別碼(即原本形式為「」的值)不同
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。