View.SaveAttributeDataForStyleable 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
儲存有關屬性的除錯資訊。
[Android.Runtime.Register("saveAttributeDataForStyleable", "(Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V", "", ApiSince=29)]
public void SaveAttributeDataForStyleable(Android.Content.Context context, int[] styleable, Android.Util.IAttributeSet? attrs, Android.Content.Res.TypedArray t, int defStyleAttr, int defStyleRes);
[<Android.Runtime.Register("saveAttributeDataForStyleable", "(Landroid/content/Context;[ILandroid/util/AttributeSet;Landroid/content/res/TypedArray;II)V", "", ApiSince=29)>]
member this.SaveAttributeDataForStyleable : Android.Content.Context * int[] * Android.Util.IAttributeSet * Android.Content.Res.TypedArray * int * int -> unit
參數
- context
- Context
此觀點所建立的背景。
- styleable
- Int32[]
參考可樣式化陣列 R.styleable.Foo
- attrs
- IAttributeSet
AttributeSet 用於建構此視圖。
已通過 TypedArray 呼叫 Resources#obtainAttributes(AttributeSet, int[])返回。
- defStyleAttr
- Int32
預設風格屬性傳入視圖建構子。
- defStyleRes
- Int32
預設樣式資源傳入視圖建構子。
- 屬性
備註
儲存有關屬性的除錯資訊。 每個使用自訂 styleable 的自訂 View 都應該在建構器中呼叫這點。 如果自訂檢視沒有呼叫,那麼這個檢視所用的自訂屬性在版面檢查工具中將無法顯示。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。