Shape Appearance Model
This class models the edges and corners of a shape, which are used by to generate and render the shape for a view's background.
Inheritors
Constructors
Types
Link copied to clipboard
class Builder
Builder to create instances of ShapeAppearanceModels.
Link copied to clipboard
A UnaryOperator that takes and returns a CornerSize.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Flag representing bottom left corner of the shape.
Link copied to clipboard
Flag representing bottom right corner of the shape.
Link copied to clipboard
Flag representing top left corner of the shape.
Link copied to clipboard
Flag representing top right corner of the shape.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
open fun builder(context: Context, @StyleRes shapeAppearanceResId: Int, @StyleRes shapeAppearanceOverlayResId: Int): ShapeAppearanceModel.Builder
open fun builder(@NonNull context: Context, attrs: AttributeSet, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int): ShapeAppearanceModel.Builder
open fun builder(@NonNull context: Context, attrs: AttributeSet, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int, @NonNull defaultCornerSize: CornerSize): ShapeAppearanceModel.Builder
open fun builder(@NonNull context: Context, attrs: AttributeSet, @AttrRes defStyleAttr: Int, @StyleRes defStyleRes: Int, defaultCornerSize: Int): ShapeAppearanceModel.Builder
open fun builder(@NonNull theme: Resources.Theme, @StyleRes shapeAppearanceResId: Int): ShapeAppearanceModel.Builder
This builder only takes in a single shape appearance, no shape appearance overlay.
Link copied to clipboard
open fun getCornerSize(@NonNull a: TypedArray, index: Int, @NonNull defaultValue: CornerSize): CornerSize
Link copied to clipboard
Returns the shape as a ShapeAppearanceModel of the ShapeAppearance, or the default shape if there are multiple shapes for different states.
Link copied to clipboard
Returns a list of the ShapeAppearanceModel of all states.
Link copied to clipboard
Returns a ShapeAppearanceModel for the given state set.
Link copied to clipboard
Checks if all corners are rounded corners.
Link copied to clipboard
Checks Corner and Edge treatments to see if we can use drawRoundRect "} to draw this model.
Link copied to clipboard
Whether or not the ShapeAppearance provides different shapes for states.
Link copied to clipboard
Returns a builder with the edges and corners from this ShapeAppearanceModel
Link copied to clipboard
Returns a new ShapeAppearanceModel with the same edges and corners as the default shape, but with the corner size for all corners updated.
Returns a copy of this ShapeAppearanceModel with the same edges and corners, but with the corner size for all corners updated.
Link copied to clipboard
open fun withTransformedCornerSizes(@NonNull op: ShapeAppearanceModel.CornerSizeUnaryOperator): ShapeAppearanceModel
Returns a copy of this ShapeAppearanceModel with the same edges and corners, but with the corner size for all corners converted by a CornerSizeUnaryOperator.