create
open fun create(@NonNull context: Context, @NonNull attributes: TypedArray, @StyleableRes index: Int, @NonNull defaultCornerSize: CornerSize): StateListCornerSize
Creates a StateListCornerSize from a styleable attribute.
If the attribute refers to an xml resource, the resource is parsed and the corner sizes are extracted from the items. If the attribute refers to a dimen or fraction resource, the resource is resolved as a CornerSize and set as the default corner size. If the attribute is not set or refers to a resource that cannot be resolved, the
defaultCornerSize is set.
Return
Parameters
context
the context
attributes
the typed array in context
index
the index of the styleable attribute
default Corner Size
the default corner size, when attribute is not set or cannot be resolved.