Agent Skill · Android

display-glasses-with-jetpack-compose-glimmer

Provides guidelines for developing projected Android XR apps for display glasses using the Jetpack Compose Glimmer UI toolkit. This skill covers foundational Glimmer design principles, workflows for implementing Jetpack Compose Glimmer, and interaction models for the glasses form factor. Use this skill to build an Android XR Augmented Experience app with Jetpack Compose Glimmer that adheres to the Glimmer design system for optimized glasses styling.

Provider: Android Path in repo: xr/display-glasses-with-jetpack-compose-glimmer/SKILL.md

Skill body

Glossary

Term Definition
Intelligent Eyewear All-day wear, hands-free devices that provide access to information. Equipped with speakers, a camera, and a microphone. Some are audio-only (audio glasses), and some also have a display (display glasses).
Display Glasses Audio glasses with the addition of a small, private display for glanceable visuals that harmonize with audio output.
Jetpack Compose Glimmer A Compose UI toolkit for building augmented Android XR experiences, optimized for display glasses. It provides components, theming, and behaviors for transparent displays.
Projected Activity (Glasses Activity) An Android Activity that runs on a host device (phone) but its UI and interactions are projected to a connected, intelligent eyewear device (audio or display glasses).
Projected Device An XR device connected to an Android-powered device (host). Host projects the application content to the Projected device and let users interact with it.
GlimmerTheme The root provider for styling tokens, including GlimmerColors, GlimmerTypography, and GlimmerShapes.
Additive Display A display technology where black (#000000) is rendered as 100% transparent. UI is built by adding light to the environment. Display glasses have an additive display.
Augmented Experiences Android XR experiences that enhance a user’s focus and presence in the real world. They are lightweight and additive, helping users while they are on-the-go
Visual Angle A unit of measurement for perceived size in XR. The minimum readable text size is 0.6 degrees (approx. 18sp at 1 m).

Prerequisites

Core Constraints

Limitations

1. Set up dependencies

2. Minimize and translate the UI

3. Map input controls

4. Build with Jetpack Compose Glimmer

Jetpack Compose Glimmer is the UI toolkit for building augmented experiences on display glasses.

Key Features

Focus Management in Glimmer

Implementing Glimmer Styles

Glimmer styles are accessed through the GlimmerTheme object. Use references/glimmertheme-source.md for reference.

Category Token Value / Role
Color primary #9BBFFF (Focal color)
Color secondary #4C88E9 (Focal color)
Color surface #262626 (Transparent base - renders as transparent)
Color outline #606460 (3.dp border color)
Shape Standard RoundedCornerShape(36.dp)
Shape Small RoundedCornerShape(12.dp)

Typography Scale (Google Sans Flex)

Strict default: When creating Glimmer UI you must use Google Sans Flex unless a custom brand typeface is explicitly specified. Variable Font Settings: As Google Sans Flex is a variable font, you must configure the following axes:

Style Name Size / Line-Height Weight Axis Width Roundness Optical size
Title Large 30.sp / 36.sp 725 100 100 9
Title Medium 24.sp / 32.sp 725 100 100 9
Title Small 20.sp / 28.sp 725 100 100 9
Body Large 30.sp / 36.sp 520 100 100 9
Body Medium 24.sp / 32.sp 520 100 100 9
Body Small 20.sp / 28.sp 520 100 100 9
Caption 18.sp / 28.sp 650 100 100 9

Depth Levels

Simulate depth on display glasses using shadows to establish a sense of hierarchy through varying levels of emphasis. The Jetpack Compose Glimmer controls use DepthEffect with 5 preset DepthEffectLevels. Use references/deptheffect-source.md and references/deptheffectlevels-source.md for reference.

Some examples:

Level Usage
level1 Standard rest state for cards and persistent background UI.
level2 Standard focus/pressed state for buttons and interactive cards.
ExtraSmall 4.dp

Implementing Jetpack Compose Glimmer Components

Cards

Cards are a fundamental surface-based container in Glimmer used to group related content, such as text, images, icons and actions into a single focal point. They establish a clear depth plane (Z-axis) in the Glasses environment, providing a stable background for text, images, and icons. Never embed a card within a List Item.

Core Implementation Logic

If you are creating a Glimmer Card component, read the:

Buttons

Buttons are the primary triggers for discrete actions in Glimmer. They are specifically optimized for the display glasses focus model, where a focus highlight is added when focus is moved to the button using the touchpad or other methods.

Core Implementation Logic

If you are creating a Glimmer Button component, read the:

Title Chips

Chips are a pill-shaped, specialized labeling component designed to sit above a Card or a group of content to provide a title. Use title chips to display concise information like a short title, a name, or a status.

Guidelines and usage

If you are creating a Glimmer Title Chip component, read the:

Icons

Icons are visual symbols used to represent concepts, actions, or status in a concise way. In Glimmer, icons and icon buttons are optimized for the XR environment, providing clear visibility on additive displays and gaze-responsive feedback for interactive elements.

Guidelines and usage

If you are creating a Glimmer Icon component, read the:

Lists

Lists are containers that allow you to navigate between and see multiple items on glasses. If your use case works with only seeing one item in the list at a time, use a Glimmer Stack. Use lists with a Title Chip when the list items are similar in type. Also use a Glimmer Stack if the items are of different types.

Guidelines and usage

If you are creating a Glimmer List component, read the:

Stacks

A stack is a collapsed list that only displays one piece of content at a time, in a stacked visual, such as a card. If it is useful to show more than one item at a time, use the Glimmer List control. Don’t use a title chip with a stack. If the items are of different types use a stack to show them. If the items are of the same type, use a list.

Guidelines and usage

Layout tips

If you are creating a Glimmer Stack component, read the:

Text

In Jetpack Compose Glimmer, the Text component builds off the Compose text component, and lets you set various text properties. Be sure to choose a style from the GlimmerTheme for your text. Modify the theme for your application if you want custom typography.

Essential Constraint: Glimmer Text versus Material Text

On transparent Display Glasses (additive displays), standard Material Text resolves to dark foreground tokens which render as transparent and invisible. Glimmer Text intelligently manages theme color matching. When no manual color override is specified, Glimmer Text automatically defaults to the content color provided by the nearest Glimmer surface.

Surface

Surface is a fundamental building block in Glimmer. Use references/surface-source.md for reference.

A surface represents a distinct visual area or ‘physical’ boundary for components such as buttons and cards. Use it if you need to build a custom component.

5. Integrate with system UI

Skill frontmatter

license: Complete terms in LICENSE.txt metadata: {"author"=>"Google LLC", "last-updated"=>"2026-05-20", "keywords"=>["Jetpack Compose Glimmer", "audio glasses", "display glasses", "Projected Activity", "GlimmerTheme", "Additive Display", "Android XR - Augmented Experiences"]}