다음을 통해 공유


View.SaveAttributeDataForStyleable Method

Definition

Stores debugging information about attributes.

[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

Parameters

context
Context

Context under which this view is created.

styleable
Int32[]

A reference to styleable array R.styleable.Foo

attrs
IAttributeSet

AttributeSet used to construct this view.

t
TypedArray

Resolved TypedArray returned by a call to Resources#obtainAttributes(AttributeSet, int[]).

defStyleAttr
Int32

Default style attribute passed into the view constructor.

defStyleRes
Int32

Default style resource passed into the view constructor.

Attributes

Remarks

Stores debugging information about attributes. This should be called in a constructor by every custom View that uses a custom styleable. If the custom view does not call it, then the custom attributes used by this view will not be visible in layout inspection tools.

Java documentation for android.view.View.saveAttributeDataForStyleable(android.content.Context, int[], android.util.AttributeSet, android.content.res.TypedArray, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to