← All components

<shape>

ContentWallpaper

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

NameTypeDefaultDescription
typeString
rectcircleline
—Shape type.
widthDp—Shape width
heightDp—Shape height
colorColor—Fill colour. Omit for stroke-only.
radiusDp—Corner radius (rect only)
strokeColorColor—Stroke colour. Omit for fill-only.
strokeWidthDp0dpStroke width. 0 = no stroke.
strokeCapString
roundbuttsquare
roundStroke cap.
strokeJoinString
roundmiterbevel
roundStroke join.
strokeMiterFloat4Miter limit (when strokeJoin=miter)
strokeDashArrayString—Comma-separated dp dash pattern, e.g. "8dp,4dp". Empty = solid.