← 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.
widthDpShape width
heightDpShape height
colorColorFill colour. Omit for stroke-only.
radiusDpCorner radius (rect only)
strokeColorColorStroke colour. Omit for fill-only.
strokeWidthDp0dpStroke width. 0 = no stroke.
strokeCapString
roundbuttsquare
roundStroke cap.
strokeJoinString
roundmiterbevel
roundStroke join.
strokeMiterFloat4Miter limit (when strokeJoin=miter)
strokeDashArrayStringComma-separated dp dash pattern, e.g. "8dp,4dp". Empty = solid.