← All components

<shape>

Content Wallpaper

Decorative geometric shape — rectangle, circle, or line. Supports both fill (`color`) and stroke (`strokeColor`/`strokeWidth`) — either, both, or neither.

Example

<shape type="circle" width="8dp" height="8dp" color="#FF5252" />

Attributes

Name Type Default Description
type String
rectcircleline
Shape type.
width Dp Shape width
height Dp Shape height
color Color Fill colour. Omit for stroke-only.
radius Dp Corner radius (rect only)
strokeColor Color Stroke colour. Omit for fill-only.
strokeWidth Dp 0dp Stroke width. 0 = no stroke.
strokeCap String
roundbuttsquare
round Stroke cap.
strokeJoin String
roundmiterbevel
round Stroke join.
strokeMiter Float 4 Miter limit (when strokeJoin=miter)
strokeDashArray String Comma-separated dp dash pattern, e.g. "8dp,4dp". Empty = solid.