← All components

<tap>

InteractiveWallpaperWidget

Invisible tap region wrapping children. Any child becomes tappable. Runs a tap action on widgets; wallpapers draw the children without interaction.

Example

<tap action="openApp" app="com.google.android.deskclock"><text>Open Clock</text></tap>

Attributes

NameTypeDefaultDescription
actionString
openAppopenActivityintentopenUrlsearchopenAlarmsopenTimerssetAlarmsetTimeropenCalendarnewEventdialsmsemailopenMapnavigateopenSettingscameraassistantshareopenAardflexopenWallpaperPickerrefreshtoggleswitchPage
—Tap action. Parameters are extra attributes named by the action.
allDayBoolean—All-day event (for newEvent)
appString—Package name, e.g. com.google.android.deskclock (for openApp)
beginString—Start: ISO date-time or epoch millis (for newEvent)
bodyString—Message text (for sms, email)
categoryString—Intent category (for intent)
componentString—Component, e.g. com.example/.MainActivity (for openActivity)
dataString—Data URI (for intent)
dateString—today | yyyy-MM-dd | epoch millis (for openCalendar)
endString—End: ISO date-time or epoch millis (for newEvent)
extrasString—Intent extras: key=value;key=value (for openActivity, intent)
hourInt—Hour 0–23 (for setAlarm)
intentActionString—Intent action, e.g. android.intent.action.VIEW (for intent)
latFloat—Latitude (for openMap)
lonFloat—Longitude (for openMap)
messageString—Alarm label (for setAlarm, setTimer)
mimeTypeString—MIME type (for intent)
minuteInt—Minute 0–59 (for setAlarm)
numberString—Phone number (for dial, sms)
packageString—Restrict to this package (for intent)
pageString
nextprev<index>
—Page index, next or prev (for switchPage)
queryString—Search terms (for search, openMap)
screenString
homewallpaperswidgetslibrarysettingswallpaper:<id>widget:<id>editor:<id>
—Target screen (for openAardflex)
secondsInt—Timer length in seconds (for setTimer)
sectionString
wifibluetoothbatterydisplaysoundlocationdateTimewallpapernotificationsappInfohome
—Settings section (for openSettings)
skipUiBoolean—Create silently without showing the clock app (for setAlarm, setTimer)
subjectString—Subject (for email, share)
textString—Text to share (for share)
titleString—Event title (for newEvent)
toString—Recipient address (for email, navigate)
urlString—http(s) URL (for openUrl)
varString—Variable name (for toggle)
gapDp—Space between children
paddingDp—Inner padding (single or top/right/bottom/left)
backgroundColor—Background color
gradientString—Gradient brush: linear(...), radial(...), sweep(...)
radiusDp—Corner radius
alignString
startcenterendstretchtopStarttopCentertopEndcenterStartcenterEndbottomStartbottomCenterbottomEnd
startCross-axis alignment (column/row) or self-alignment within parent (box).
justifyString
startcenterendspaceBetweenspaceAroundspaceEvenly
startMain-axis distribution.
fillMaxWidthBooleanfalseFill available width
fillMaxHeightBooleanfalseFill available height
flexFloat—Flex weight for parent distribution
opacityWallpaper onlyFloat1.0Opacity (0.0–1.0)
rotateWallpaper onlyFloat—Rotation in degrees, clockwise around the element's centre. Takes expressions, e.g. "{dt:minuteAngle}" for a clock hand.
scaleWallpaper onlyString—Uniform scale factor, or 'sx,sy' for axis-specific
offsetWallpaper onlyString—Translation 'x,y' in dp or % (e.g. '8dp,-4dp' or '10%,0%')
blurWallpaper onlyDp—Blur radius (Dp) applied to the element and its children
clipToBoundsWallpaper onlyBooleanfalseClip children that draw outside this element's bounds
requiredWidthWallpaper onlyDp—Width that ignores the parent's constraints (Compose requiredWidth); use with a clipped parent
requiredHeightWallpaper onlyDp—Height that ignores the parent's constraints (Compose requiredHeight); use with a clipped parent
animateWallpaper onlyString—Animation preset shorthand, e.g. "pulse:2s", "breathe:4s", "spin:8s", "bob:3s:8dp", "sway:4s:6", "fade:3s:0.3:1", "shimmer:2s". Reads the shared animation clock so all animated elements stay phase-locked.
refreshWallpaper onlyString—Update rate for this element and its children, independent of the root updateFrequency: "frame" re-evaluates every animation frame (a sweeping second hand bound to {dt:secondAngleSmooth}); "500ms", "1s", "1m" run their own tick.
transitionWallpaper onlyString
fadeslideUpslideDownflipTopflipBottom
—One-shot animation played when the content changes: "<preset>[:duration][:delay]", e.g. "fade:300ms" or "flipTop:300ms". The change is detected on transitionKey, or on the text for <text>.
transitionKeyWallpaper onlyString—Expression whose value triggers the transition when it changes, e.g. "{dt:minute}"
overlayVisibleBooleanfalseKeep this element visible when the widget renders in overlay mode (default: hidden, the wallpaper draws it)