Material Shape Drawable
Base drawable class for Material Shapes that handles shadows, elevation, scale and color for a generated path.
Inheritors
Constructors
Properties
Functions
Link copied to clipboard
Returns a
MaterialShapeDrawable
with the elevation overlay functionality initialized, a fill color of colorSurface
, and an elevation of 0.open fun createWithElevationOverlay(@NonNull context: Context, elevation: Float): MaterialShapeDrawable
Returns a
MaterialShapeDrawable
with the elevation overlay functionality initialized, a fill color of colorSurface
, and an elevation of elevation
.open fun createWithElevationOverlay(@NonNull context: Context, elevation: Float, @Nullable backgroundTint: ColorStateList): MaterialShapeDrawable
Returns a
MaterialShapeDrawable
with the elevation overlay functionality initialized, a fill color of backgroundTint
, and an elevation of elevation
.Link copied to clipboard
Returns the actual size of the bottom left corner for the current bounds.
Link copied to clipboard
Returns the actual size of the bottom right corner for the current bounds.
Link copied to clipboard
Link copied to clipboard
Returns the elevation used to render both fake shadows when requiresCompatShadow is true and elevation overlays.
Link copied to clipboard
Get the color used for the fill.
Link copied to clipboard
Get the interpolation of the path, between 0 and 1.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Get the current style used by the shape's paint.
Link copied to clipboard
Returns the parent absolute elevation.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the rotation offset applied to the fake shadow which is drawn when requiresCompatShadow is true.
Link copied to clipboard
Get the shadow elevation rendered by the path.
Link copied to clipboard
Returns the X offset of the shadow from the bounds of the shape.
Link copied to clipboard
Returns the Y offset of the shadow from the bounds of the shape.
Link copied to clipboard
Get the shadow radius rendered by the path in pixels.
Link copied to clipboard
Returns the shadow vertical offset rendered for shadows when requiresCompatShadow is true.
Link copied to clipboard
Get the ShapeAppearanceModel containing the path that will be rendered in this drawable.
Link copied to clipboard
Get the ShapePathModel containing the path that will be rendered in this drawable.
Link copied to clipboard
Get the color used for the stroke.
Link copied to clipboard
Get the stroke's current ColorStateList.
Link copied to clipboard
Get the stroke width used by the shape's paint.
Link copied to clipboard
Get the tint list used by the shape's paint.
Link copied to clipboard
Returns the actual size of the top left corner for the current bounds.
Link copied to clipboard
Returns the actual size of the top right corner for the current bounds.
Link copied to clipboard
Returns the translationZ used to render both fake shadows when requiresCompatShadow is true and elevation overlays.
Link copied to clipboard
Initializes the elevation overlay functionality for this drawable.
Link copied to clipboard
Link copied to clipboard
Returns whether the elevation overlay functionality is initialized and enabled in this drawable's theme context.
Link copied to clipboard
Returns whether the elevation overlay functionality has been initialized for this drawable.
Link copied to clipboard
Determines whether a point is contained within the transparent region of the Drawable.
Link copied to clipboard
Checks Corner and Edge treatments to see if we can use drawRoundRect "} to draw this model.
Link copied to clipboard
Get shadow rendering status for shadows when requiresCompatShadow is true.
Link copied to clipboard
Link copied to clipboard
Returns true if fake shadows should be drawn.
Link copied to clipboard
Link copied to clipboard
Updates the corners for the given CornerSize.
Link copied to clipboard
Link copied to clipboard
Sets the elevation used to render both fake shadows when requiresCompatShadow is true and elevation overlays.
Link copied to clipboard
Set the color used for the fill.
Link copied to clipboard
Set the interpolation of the path, between 0 and 1.
Link copied to clipboard
Configure the padding of the shape
Link copied to clipboard
Set the style used by the shape's paint.
Link copied to clipboard
Sets the parent absolute elevation, which is used to render elevation overlays.
Link copied to clipboard
Link copied to clipboard
Set the color of fake shadow rendered behind the shape.
Link copied to clipboard
Set the shadow compatibility mode.
Link copied to clipboard
Set the rotation offset applied to the fake shadow which is drawn when requiresCompatShadow is true.
Link copied to clipboard
Set the shadow elevation rendered by the path.
Link copied to clipboard
Set shadow rendering to be enabled or disabled when requiresCompatShadow is true.
Link copied to clipboard
Set the shadow radius rendered by the path.
Link copied to clipboard
Sets the shadow offset rendered by the fake shadow when requiresCompatShadow is true.
Link copied to clipboard
Set the ShapeAppearanceModel containing the path that will be rendered in this drawable.
Link copied to clipboard
Set the ShapePathModel containing the path that will be rendered in this drawable.
Link copied to clipboard
Set the shape's stroke width and stroke color using a ColorStateList.
Set the shape's stroke width and stroke color.
Link copied to clipboard
Set the color used for the stroke.
Link copied to clipboard
Set the shape's stroke ColorStateList
Set the shape's stroke color.
Link copied to clipboard
Set the stroke width used by the shape's paint.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Sets the translationZ used to render both fake shadows when requiresCompatShadow is true and elevation overlays.
Link copied to clipboard
Set whether fake shadow color should match next set tint color.