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
傳遞至檢視建構函式的預設樣式資源。
- 屬性
備註
儲存屬性的偵錯資訊。 每個使用自訂樣式的自訂 View
都應該在建構函式中呼叫此專案。 如果自訂檢視未呼叫它,則此檢視所使用的自訂屬性將不會顯示在版面配置檢查工具中。
此頁面的部分是根據所建立和共用的工作進行修改,並根據 2.5 屬性授權中所述的詞彙來使用。