Everything below is available inside $…$. Some variables only mean something in a particular place: app_name inside an app field, item_* inside a repeater card, scrub_* inside a scrub strip, page_position relative to the page the element sits on.
This table is generated from the same catalogue the app's editor offers, and a test fails the build if the two ever disagree, so it cannot describe a variable the launcher does not have, and cannot omit one it does.
Repeater entries add item_<key> variables of their own, named after the keys of the data; those are not listed here because they depend on the source. See repeaters.
Height of the status bar in dp. Use it instead of a fixed top margin — it differs per device.
nav_bar_height
number
Height of the system navigation bar in dp; 0 on gesture navigation.
inset_left
number
Left display cutout / rounded-corner inset in dp. Non-zero mainly in landscape.
inset_right
number
Right display cutout inset in dp.
ime_height
number
Height of the on-screen keyboard in dp, measured from the bottom edge of the screen (so it includes the navigation bar). 0 while the keyboard is closed. Follows the keyboard frame by frame while it slides in or out.
is_landscape
yes/no
True while the device is held in landscape.
font_scale
number
The system font-size factor (1.0 = default). Multiply your own text sizes by it to respect the user's accessibility setting.
True when the person has switched animations off ("Remove animations" in accessibility). Themes decide for themselves what to do with it: leave a movement out, or make it smaller.
Index of the page this element sits on, counted along its row.
page_count
number
Number of pages in the row this page belongs to.
page_position
number
Signed distance of this page from the one on screen: 0 while it is centred, -1 one page to the left, +1 to the right, fractional while a swipe is in progress. The variable most parallax and fade effects are built on.
page_scroll_fraction
number
1 while a page swipe is in progress, 0 at rest. A switch, not a slider: use it to show something only while swiping. For a value that grows with the swipe, use page_swipe_progress.
page_swipe_progress
number
How far the current page swipe has got: 0 at rest, rising smoothly to 1 when the swipe reaches the neighbouring page. Built for blends that follow the finger.
page_row
number
Row of the page in the 2D page grid; 0 is the classic home row.
page_row_position
number
Row position while a vertical page change is running, moving with it: 2, then 2.4, then 3. page_row only snaps once the change has landed, so a movement built on it happens after the change; this one happens with it.
Device tilt sideways in degrees (the roll angle). Absolute: it stays where the phone is held and never returns to the middle. Reading it turns on the rotation sensor, which costs battery. For depth effects use parallax_x.
tilt_y
number
Device tilt forwards and backwards in degrees (the pitch angle). Absolute, like tilt_x.
compass_heading
number
Compass heading in degrees, 0–360.
parallax_x
number
Smoothed sideways tilt for depth, -1 to 1, positive when the right edge moves away from you. Measured against a reference that follows the phone, so holding it at an angle drifts back to 0 within a few seconds, and a phone lying still produces no frames at all. Turns on the gyroscope only while the home screen is visible.
lock_state
number
The unlock transition: 0 while the lock screen is still showing, 1 once the home screen is at rest. After an unlock it springs from 0 to 1 and may overshoot a little; otherwise it stays at 1. Build your own unlock with it, for example a scale of $1 + (1 - lock_state) * 0.1$.
parallax_y
number
Smoothed forward and backward tilt for depth, -1 to 1, positive when the top edge moves away from you. Behaves like parallax_x.
Inside a scrub repeater: position of this card relative to the finger, in cards (0 = under the finger). The wave in the alphabet index is built from it.
scrub_press
number
Inside a scrub repeater: 1 while the finger is down, 0 when it is not — animated, so it eases between the two.
scrub_vis
number
Inside a scrub repeater: 1 while the strip should be visible, 0 while it is hidden.
scrub_over
number
Inside a scrub repeater: 1 for the card directly under the finger, 0 for all others.
Inside an app field: the app's package name, e.g. "com.android.chrome".
app_profile
text
Inside an app field: which profile the app belongs to — "personal", "work" or "private".
app_badge
number
Inside an app field: number of pending notifications for this app.
app_is_shortcut
yes/no
Inside an app field: true when the entry is a pinned shortcut (a web app or bookmark added from a browser) instead of an installed app. Note that app_package then names the host app, so filter on this variable rather than on the package name.
work_profile_available
yes/no
True when a work profile exists on this device.
work_profile_locked
yes/no
True while the work profile is paused, so a theme can draw its own unlock row.
private_space_available
yes/no
True when a Private Space exists on this device.
private_space_locked
yes/no
True while the Private Space is locked.
private_space_hidden_when_locked
yes/no
True when the user chose to hide the Private Space entirely while it is locked.
notification_access
yes/no
True once the launcher has notification access. Draw your "grant access" hint behind a check on this, or it will never disappear.
notification_count
number
Total number of pending notifications across all apps.