Resources.ObtainTypedArray(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳一組異質數值。
[Android.Runtime.Register("obtainTypedArray", "(I)Landroid/content/res/TypedArray;", "GetObtainTypedArray_IHandler")]
public virtual Android.Content.Res.TypedArray ObtainTypedArray(int id);
[<Android.Runtime.Register("obtainTypedArray", "(I)Landroid/content/res/TypedArray;", "GetObtainTypedArray_IHandler")>]
abstract member ObtainTypedArray : int -> Android.Content.Res.TypedArray
override this.ObtainTypedArray : int -> Android.Content.Res.TypedArray
參數
- id
- Int32
由 aapt 工具產生的目標資源識別碼。 此整數編碼套件、類型及資源條目。 值 0 是無效的識別碼。
傳回
回傳一個 TypedArray,裡面包含陣列的數值陣列。
完成後一定要打電話 TypedArray#recycle() TypedArray.recycle() 給我。
- 屬性
例外狀況
如果給定的 ID 不存在,則拋出 NotFoundException。
備註
回傳一組異質數值。
Java 文件 android.content.res.Resources.obtainTypedArray(int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。