Updates skills (2026-05-09 10:47)

This commit is contained in:
android-devrel-github-bot
2026-05-09 10:47:43 +00:00
parent 4b896c8c60
commit 3463433cfd
24 changed files with 7663 additions and 278 deletions
-207
View File
@@ -1,207 +0,0 @@
---
name: base
description: Orchestrates Android development tasks
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
keywords:
- AndroidCLI
---
including project creation, deployment, SDK management, and environment
diagnostics using the `android` command-line tool.
This skill provides instructions for using the `android` CLI tool. The tool includes various commands for creating projects, running applications, interacting with devices, and managing the CLI environment.
## SDK management
To manage the installation of Android SDKs and tools, use the `sdk` command. For example:
- `android sdk install <package>[@<version>]...`: Install specific packages. Multiple packages can be specified, separated by spaces. `<version>` defaults to latest. For example: `android sdk install platforms/android-30@2 platforms/android-34`
- `android sdk update [<pkg-name>]`: Update a specific package or all packages to the latest version.
- `android sdk remove <pkg-name>`: Remove a package from the local SDK.
- `android sdk list --all`: List installed and available SDK packages.
## Project creation
Create projects from templates using the `create` command.
For example: `android create empty-activity --name="My App" --output=./my-app`
## Interacting with devices
For more information on interacting with running devices, see [here](https://developer.android.com/agents/skills/android-cli/base/references/interact)
## Running journey tests
For more information on running journeys, see [here](https://developer.android.com/agents/skills/android-cli/base/references/journeys)
## Doc searching
The `docs` command searches authoritative, high-quality Android developer documentation in the Android Knowledge Base.
By providing a few keywords, this tool will return high quality articles that contain examples or guidance on how to use Android APIs or libraries.
Use this tool to obtain additional information on how to achieve Android-specific tasks or to know more about Android APIs, surfaces, libraries, or devices.
Always use this tool to get the most up-to-date information about Android concepts. Typical good use cases are:
- Finding migration guides for APIs.
- Finding examples for APIs.
- Finding up-to-date information about Android APIs.
- Finding best practices for Android concepts.
## Running APKs
Use the `run` command to run Android apps.
## Managing emulators
Manage Android Virtual Devices (AVDs) using the `android emulator` command
## Capturing screenshots
Capture an image of the current screen of a connected Android device and output it to a file using the `android screenshot` command.
## Managing skills
Manage antigravity agent skills for Android using the `android skills` command.
## Inspecting UI Layouts
Use the `android layout` command to inspect the UI layout of an Android application. It returns the layout tree of an Android application in JSON format. When debugging UI errors, this is often a much faster approach than taking a screenshot.
## Updating the CLI
Update the Android CLI using the `android update` command.
# `android help` output
Usage: android \[-hV\] \[--sdk=PARAM\] \[COMMAND\]
-h, --help Show this help message and exit.
--sdk=PARAM Path to the Android SDK
-V, --version Print version information and exit.
Commands:
create Create a new Android project
describe Analyzes an Android project to generate descriptive metadata.
docs Android documentation commands
emulator Emulator commands
help Shows the help of all commands
info Print environment information (SDK Location, etc.)
init Initializes the environment (eg. skills) for Android CLI.
layout Returns the layout tree of an application
run Deploy an Android Application
screen Commands to view the device
sdk Download and list SDK packages
skills Manage skills
update Update the Android CLI
create
Usage: android create \[-h\] \[--verbose\] \[--list\] \[--minSdk=api\]
--name=applicationName \[-o=dest-path\] \[template-name\]
Create a new Android project
\[template-name\] The template name
-h, --help Show this help message and exit.
--minSdk=api The 'minSdk' supported by the application (default
is defined in the template)
--name=applicationName
The name of the application (e.g. 'My Application')
-o, --output=dest-path The destination project directory path (default is
'.')
--verbose Enables verbose output
--list List all available templates
describe
Usage: android describe \[-hV\] \[--project_dir=PARAM\]
Analyzes an Android project to generate descriptive metadata.
This command identifies and outputs the paths to JSON files that detail the
project's structure, including build targets and their corresponding output
artifact locations (e.g., APKs). This information enables other tools and
commands to locate build artifacts efficiently.
-h, --help Show this help message and exit.
--project_dir=PARAM The project directory to describe
-V, --version Print version information and exit.
docs
Usage: android docs \[-h\] \[COMMAND\]
Android documentation commands
-h, --help Show this help message and exit.
Commands:
search Search Android documentation
fetch Fetch Android documentation
emulator
Usage: android emulator \[-h\] \[COMMAND\]
Emulator commands
-h, --help Show this help message and exit.
Commands:
create Creates a virtual device
start Launches the specified virtual device. This command will return when
the emulator is fully started and ready to use.
stop Stops the specified virtual device
list Lists available virtual devices
remove Delete a virtual device
help
Usage: android help \[COMMAND\]
Shows the help of all commands
\[COMMAND\] The command to show help for
info
Usage: android info Print environment information (SDK Location, etc.) The specific field to print the value of. If omitted print all.
init
Usage: android init
Initializes the environment (eg. skills) for Android CLI.
layout
Usage: android layout \[-dhp\] \[--device=PARAM\] \[-o=PARAM\]
Returns the layout tree of an application
-d, --diff Returns a flat list of the layout elements that have
changed since the last invocation of ui-dump
--device=PARAM The device serial number
-h, --help Show this help message and exit.
-o, --output=PARAM Writes the layout tree to the specified file or
directory. If omitted, prints the tree to standard
output
-p, --pretty Pretty-prints the returned JSON
run
Usage: android run \[-h\] \[--debug\] \[--activity=PARAM\] \[--device=PARAM\]
\[--type=PARAM\] \[--apks=PARAM\[,PARAM...\]\]...
Deploy an Android Application
--activity=PARAM The activity name
--apks=PARAM\[,PARAM...\]
The paths to the APKs
--debug Run in debug mode
--device=PARAM The device serial number
-h, --help Show this help message and exit.
--type=PARAM The component type (ACTIVITY, SERVICE, etc.)
screen
Usage: android screen \[-h\] \[COMMAND\]
Commands to view the device
-h, --help Show this help message and exit.
Commands:
capture Outputs the device screen to a PNG
resolve Target UI elements visually
sdk
Usage: android sdk \[COMMAND\]
Download and list SDK packages
Commands:
install Install SDK packages
update Update one or all packages to the latest version
remove Remove a package from the SDK
list List installed and available SDK packages
skills
Usage: android skills \[COMMAND\]
Manage skills
Commands:
add Install a skill
remove Remove a skill
list List available skills
find Find skills by keyword
update
Usage: android update \[--url=PARAM\]
Update the Android CLI
--url=PARAM The URL to download the update from
+2 -1
View File
@@ -6,6 +6,7 @@ description: Upgrades, or migrates, an Android project to use Android Gradle Plu
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-04-17'
keywords:
- Android Gradle Plugin 9
- AGP 9
@@ -99,4 +100,4 @@ After migration, verify the following:
## Troubleshooting
Paparazzi v2.0.0-alpha04 and lower versions have issues with AGP 9. See
[references/paparazzi-gradle-9.md](references/paparazzi-gradle-9.md) for details.
[references/paparazzi-gradle-9.md](references/paparazzi-gradle-9.md) for details.
+32 -28
View File
@@ -6,6 +6,7 @@ description: Use this skill to migrate legacy Android camera implementations (Ca
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-05-06'
keywords:
- Android
- CameraX
@@ -24,43 +25,46 @@ for interoperability, or version 1.5.0 or higher for Compose extensions.
If you are using a Version Catalog (`libs.versions.toml`), add the following:
[versions]
camerax = "<minimum_version_needed>"
[libraries]
androidx-camera-core = { group = "androidx.camera", name = "camera-core", version.ref = "camerax" }
androidx-camera-camera2 = { group = "androidx.camera", name = "camera-camera2", version.ref = "camerax" }
androidx-camera-lifecycle = { group = "androidx.camera", name = "camera-lifecycle", version.ref = "camerax" }
# If using Android Views (Option A)
androidx-camera-view = { group = "androidx.camera", name = "camera-view", version.ref = "camerax" }
# If using Jetpack Compose (Option B)
androidx-camera-compose = { group = "androidx.camera", name = "camera-compose", version.ref = "camerax" }
```kotlin
[versions]
camerax = "<minimum_version_needed>"
[libraries]
androidx-camera-core = { group = "androidx.camera", name = "camera-core", version.ref = "camerax" }
androidx-camera-camera2 = { group = "androidx.camera", name = "camera-camera2", version.ref = "camerax" }
androidx-camera-lifecycle = { group = "androidx.camera", name = "camera-lifecycle", version.ref = "camerax" }
androidx-camera-view = { group = "androidx.camera", name = "camera-view", version.ref = "camerax" }
androidx-camera-compose = { group = "androidx.camera", name = "camera-compose", version.ref = "camerax" }
```
<br />
And in your `build.gradle.kts` (or `build.gradle`):
// Core dependencies
implementation(libs.androidx.camera.core)
implementation(libs.androidx.camera.camera2)
implementation(libs.androidx.camera.lifecycle)
// If using Android Views (Option A)
implementation(libs.androidx.camera.view)
```kotlin
implementation(libs.androidx.camera.core)
implementation(libs.androidx.camera.camera2)
implementation(libs.androidx.camera.lifecycle)
implementation(libs.androidx.camera.view)
implementation(libs.androidx.camera.compose)
```
// If using Jetpack Compose (Option B)
implementation(libs.androidx.camera.compose)
<br />
Without a Version Catalog, fall back to these standard Gradle dependencies:
// Core dependencies
implementation "androidx.camera:camera-core:<minimum_version_needed>"
implementation "androidx.camera:camera-camera2:<minimum_version_needed>"
implementation "androidx.camera:camera-lifecycle:<minimum_version_needed>"
// If using Android Views (Option A)
implementation "androidx.camera:camera-view:<minimum_version_needed>"
```kotlin
implementation "androidx.camera:camera-core:<minimum_version_needed>"
implementation "androidx.camera:camera-camera2:<minimum_version_needed>"
implementation "androidx.camera:camera-lifecycle:<minimum_version_needed>"
implementation "androidx.camera:camera-view:<minimum_version_needed>"
implementation "androidx.camera:camera-compose:<minimum_version_needed>"
```
// If using Jetpack Compose (Option B)
implementation "androidx.camera:camera-compose:<minimum_version_needed>"
<br />
## Step 1: Remove Legacy Implementation
@@ -258,9 +262,9 @@ lensFacing = if (lensFacing == CameraSelector.LENS_FACING_BACK) {
<br />
## What not to do.
## Constraints
- **Don't manage the camera lifecycle manually** : Bind the camera to a `LifecycleOwner` through the `ProcessCameraProvider`. Avoid manual camera open or close logic in `onResume` or `onPause`.
- **Don't calculate focus matrices manually** : `MeteringPointFactory` handles coordinate transformations, including device rotation offsets. Avoid custom matrix implementations.
- **Don't forget to close the ImageProxy** : Remember to invoke `image.close()` in the capture callback. Skipping this call locks the capture pipeline and interrupts subsequent photos.
- **Don't wrap `PreviewView` in `AndroidView` for Compose code** : For Compose UI layouts, use `CameraXViewfinder`. Compiling `PreviewView` in an `AndroidView` is an old fallback option that introduces resizing issues.
- **Don't wrap `PreviewView` in `AndroidView` for Compose code** : For Compose UI layouts, use `CameraXViewfinder`. Compiling `PreviewView` in an `AndroidView` is an old fallback option that introduces resizing issues.
+207
View File
@@ -0,0 +1,207 @@
---
name: android-cli
description: Orchestrates Android development tasks including project creation, deployment, SDK management, and environment diagnostics using the `android` command-line tool.
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
keywords:
- sdk
- emulator
- skills
- docs
- knowledge base
- project creation
- screenshots
---
# Android CLI Specialist
This skill provides instructions for using the `android` CLI tool. The tool includes various commands for creating projects, running applications, interacting with devices, and managing the CLI environment.
## SDK management
To manage the installation of Android SDKs and tools, use the `sdk` command. For example:
- `android sdk install <package>[@<version>]...`: Install specific packages. Multiple packages can be specified, separated by spaces. `<version>` defaults to latest. For example: `android sdk install platforms/android-30@2 platforms/android-34`
- `android sdk update [<pkg-name>]`: Update a specific package or all packages to the latest version.
- `android sdk remove <pkg-name>`: Remove a package from the local SDK.
- `android sdk list --all`: List installed and available SDK packages.
## Project creation
Create projects from templates using the `create` command.
For example: `android create empty-activity --name="My App" --output=./my-app`
## Interacting with devices
For more information on interacting with running devices, see [here](references/interact.md)
## Running journey tests
For more information on running journeys, see [here](references/journeys.md)
## Doc searching
The `docs` command searches authoritative, high-quality Android developer documentation in the Android Knowledge Base.
By providing a few keywords, this tool will return high quality articles that contain examples or guidance on how to use Android APIs or libraries.
Use this tool to obtain additional information on how to achieve Android-specific tasks or to know more about Android APIs, surfaces, libraries, or devices.
Always use this tool to get the most up-to-date information about Android concepts. Typical good use cases are:
- Finding migration guides for APIs.
- Finding examples for APIs.
- Finding up-to-date information about Android APIs.
- Finding best practices for Android concepts.
## Running APKs
Use the `run` command to run Android apps.
## Managing emulators
Manage Android Virtual Devices (AVDs) using the `android emulator` command
## Capturing screenshots
Capture an image of the current screen of a connected Android device and output it to a file using the `android screenshot` command.
## Managing skills
Manage antigravity agent skills for Android using the `android skills` command.
## Inspecting UI Layouts
Use the `android layout` command to inspect the UI layout of an Android application. It returns the layout tree of an Android application in JSON format. When debugging UI errors, this is often a much faster approach than taking a screenshot.
## Updating the CLI
Update the Android CLI using the `android update` command.
# `android help` output
Usage: android [-hV] [--sdk=PARAM] [COMMAND]
-h, --help Show this help message and exit.
--sdk=PARAM Path to the Android SDK
-V, --version Print version information and exit.
Commands:
create Create a new Android project
describe Analyzes an Android project to generate descriptive metadata.
docs Android documentation commands
emulator Emulator commands
help Shows the help of all commands
info Print environment information (SDK Location, etc.)
init Initializes the environment (eg. skills) for Android CLI.
layout Returns the layout tree of an application
run Deploy an Android Application
screen Commands to view the device
sdk Download and list SDK packages
skills Manage skills
update Update the Android CLI
create
Usage: android create [-h] [--verbose] [--list] [--minSdk=api]
--name=applicationName [-o=dest-path] [template-name]
Create a new Android project
[template-name] The template name
-h, --help Show this help message and exit.
--minSdk=api The 'minSdk' supported by the application (default
is defined in the template)
--name=applicationName
The name of the application (e.g. 'My Application')
-o, --output=dest-path The destination project directory path (default is
'.')
--verbose Enables verbose output
--list List all available templates
describe
Usage: android describe [-hV] [--project_dir=PARAM]
Analyzes an Android project to generate descriptive metadata.
This command identifies and outputs the paths to JSON files that detail the
project's structure, including build targets and their corresponding output
artifact locations (e.g., APKs). This information enables other tools and
commands to locate build artifacts efficiently.
-h, --help Show this help message and exit.
--project_dir=PARAM The project directory to describe
-V, --version Print version information and exit.
docs
Usage: android docs [-h] [COMMAND]
Android documentation commands
-h, --help Show this help message and exit.
Commands:
search Search Android documentation
fetch Fetch Android documentation
emulator
Usage: android emulator [-h] [COMMAND]
Emulator commands
-h, --help Show this help message and exit.
Commands:
create Creates a virtual device
start Launches the specified virtual device. This command will return when
the emulator is fully started and ready to use.
stop Stops the specified virtual device
list Lists available virtual devices
remove Delete a virtual device
help
Usage: android help [COMMAND]
Shows the help of all commands
[COMMAND] The command to show help for
info
Usage: android info <field>
Print environment information (SDK Location, etc.)
<field> The specific field to print the value of. If omitted print all.
init
Usage: android init
Initializes the environment (eg. skills) for Android CLI.
layout
Usage: android layout [-dhp] [--device=PARAM] [-o=PARAM]
Returns the layout tree of an application
-d, --diff Returns a flat list of the layout elements that have
changed since the last invocation of ui-dump
--device=PARAM The device serial number
-h, --help Show this help message and exit.
-o, --output=PARAM Writes the layout tree to the specified file or
directory. If omitted, prints the tree to standard
output
-p, --pretty Pretty-prints the returned JSON
run
Usage: android run [-h] [--debug] [--activity=PARAM] [--device=PARAM]
[--type=PARAM] [--apks=PARAM[,PARAM...]]...
Deploy an Android Application
--activity=PARAM The activity name
--apks=PARAM[,PARAM...]
The paths to the APKs
--debug Run in debug mode
--device=PARAM The device serial number
-h, --help Show this help message and exit.
--type=PARAM The component type (ACTIVITY, SERVICE, etc.)
screen
Usage: android screen [-h] [COMMAND]
Commands to view the device
-h, --help Show this help message and exit.
Commands:
capture Outputs the device screen to a PNG
resolve Target UI elements visually
sdk
Usage: android sdk [COMMAND]
Download and list SDK packages
Commands:
install Install SDK packages
update Update one or all packages to the latest version
remove Remove a package from the SDK
list List installed and available SDK packages
skills
Usage: android skills [COMMAND]
Manage skills
Commands:
add Install a skill
remove Remove a skill
list List available skills
find Find skills by keyword
update
Usage: android update [--url=PARAM]
Update the Android CLI
--url=PARAM The URL to download the update from
@@ -0,0 +1,83 @@
# Tools
Run `android layout --help` and `android screen --help`.
## UI Dump
`android layout` returns a flat JSON list of the UI elements on screen.
`android layout --diff` returns a flat JSON list of the UI elements that have changed since the last call to `layout` or `layout --diff`
Each JSON object represents a UI element in the Android app. The following properties may be present:
- `text` - any literal text the element contains
- `resourceId` - the Android resource id used to refer to the element
- `contentDesc` - a description of a UI element for use by accessibility tools
- `interactions` - the set of user interactions the element supports. May contain one or more of: `checkable`, `clickable`, `focusable`, `scrollable`, `long-clickable`, `password`
- `state` - the set of states the element is in. May contain one or more of `checked`, `focused`, `selected`
- `bounds` - the screen coordinates of the bounding rectangle of the element, in the format `[min X,min Y][max X, max Y]`
- `center` - the screen coordinates of the center of the element, in the format `[x,y]`
- `off-screen` - if true, the element is in the UI hierarchy but not visible; it may require scrolling to view.
Use `layout` as a primary means of examining an Android app. Use `layout --diff` to focus on changes and to keep your context small.
Example: When entering digits into a calculator, use `layout --diff` to output only the digit readout element.
`layout` may fail due to the app displaying a WebView or animation; in these cases, use `android screen --annotate` to inspect the app.
This failure will likely resolve after navigating away from the current screen.
## Screenshot
`android screen capture -o <file path>` saves a PNG of the current device screen to `<file path>`
Use `screen capture` as a secondary means of examining an Android app
Examples:
- Understanding the content of an on-screen image
- Looking at a `WebView` (web content does not always appear in the ui dump)
- Trying to find a UI element by its visual appearance
**IMPORTANT**: Always *VISUALLY* examine the PNG image returned from `android screen` BEFORE doing anything else.
## Annotated Screenshot
`android screen capture --annotate -o <file path>`
`android screen resolve --screen <path> --string <string>`
The `--annotate` command adds numerical labels and bounding boxes around UI elements. Use this command to locate UI elements that cannot
be located in the `layout` output.
**IMPORTANT**: When using `android screen --annotate`, always *VISUALLY* examine the resulting PNG file.
To refer to these labels in input commands, use `screen resolve` to convert labels into coordinates:
`android screen resolve --screen <file path> --string "#3"` returns `<x coord of region 3> <y coord of region 3>`
To save turns, you can combine shell commands:
`adb shell input $(android screen resolve --screen screen.png --string "tap #34")`
This command taps on region #34 from `screen.png`
## Input
Use `adb shell input` for interacting with Android devices.
Refer to the `"interactions"` property of an element for what interactions can be performed on a particular element.
Interact with UI elements with their `center` coordinate or their `bounds` coordinates:
```json
{
"key": -248568265,
"class": "android.widget.Button",
"bounds": "[138,9][167,38]",
"center": "[152,23]"
}
```
To tap on this button, you would execute `adb shell input tap 152 23`. This taps the center.
```json
{
"key": 12487234,
"class": "com.example.ui.ScrollableList",
"bounds": "[100,200][400,600]",
"center": "[250,400]"
}
```
To scroll down on this list, you would execute `adb shell input swipe 250 400 600 500`. This swipes from the center to the bottom over 500ms.
# Android Interaction Rules
1. Always ensure text input fields have `"focused"` in their `"state"` list before entering text
2. If an element has `"scrollable"` in its `"interactions"` list, try scrolling it when looking for missing UI elements
2. Always scroll slowly when executing scroll inputs. The 5th argument to `adb shell input swipe` controls scroll duration.
3. Content may take time to load; if a `layout` is missing information after you take an action, wait a few seconds, then perform `layout --diff` to see if anything changes.
@@ -0,0 +1,97 @@
A journey is an XML-specified test of an Android app's behavior. It consists of a list of `<action>` elements. For example:
```xml
<journey name="My Journey">
<description>
A sample journey to illustrate the format
</description>
<actions>
<action>
Tap the "Home" icon
</action>
<action>
Verify that the app is on its Home screen
</action>
</actions>
</journey>
```
Evaluate a journey by proceeding through the `<actions>` list in sequential order. Evaluate each `<action>` block individually.
A journey succeeds if all elements in the `<actions>` list succeed.
A journey is a test case for an app. The journey XML is the source of truth; if the app disagrees with the journey, the app has failed.
Additionally, if the app exits, crashes, or freezes, journey evaluation stops and the journey fails.
**IMPORTANT** - Execute each step EXACTLY as written, and independently of other steps! If an action says to `"tap the first search result"`,
you MUST find the search results and tap the first one. Do this even if you believe you know the intent behind the action.
## Taking Actions
Some `<action>` elements specify UI interactions to perform on the running Android app. Perform the interaction and verify that the app does
not crash or behave in an unexpected manner. This is the *only* verification you should perform for an `<action>`.
If the interaction cannot be performed as specified, the journey fails.
Example:
```<action>Click the red button</action>```
If you determine a red button is not present in the UI, the journey fails.
If the text of an `<action>` specifies a list of actions, break it into sub-actions and evaluate them individually:
Example:
```<action>Search for soda and add the first result to the cart</action>```
This should be evaluated as:
```
<action>Search for soda</action>
<action>Add the first result to the cart</action>
```
If an `<action>` contains something that is not a specification for a UI interaction, alert the user that the journey is malformed and exit
early, specifying the error in question.
## Verifying Expectations
`<action>` elements that begin with "check" or "verify" specify expectations for the current state of the Android app. Determine the current
state of the app and check if the expectations are met.
Determine the current state of the app by inspecting the current screen of the device without interacting with it.
Example:
```<action>Check if "Switch 2" is visible on the screen</action>```
This requires only inspecting the current screen, not scrolling or interacting. If "Switch 2" is not currently visible, the action fails.
If the expectations are not met, mark the `<action>` as a failure and the journey evaluation ends. A single `<action>` may contain
multiple expectations.
Example:
```<action>Verify that the app is on the Home screen, the Home icon is blue, and the temperature is displayed</action>```
This `<action>` fails if ANY of the following are false:
- The app is on the Home screen
- There is a Home icon, and it is blue
- A temperature is displayed
## Handling failure
When running a journey, evaluate it as a test. Failure is acceptable, and often expected. Proper reporting of failures is the priority.
Keep debugging and troubleshooting to a minimum; assume that tools are showing you the correct output every time. The goal is to determine
if the *current* Android app can correctly handle the *current* steps outlined in the journey. Suggestions for bug fixes, clarification, or
other improvements should be kept to journey evaluation summary at the end.
## Summarizing
For each `<action>` you evaluated, output JSON describing the results.
```
{
"journey:", The name of the journey
"results:" [
{
// A string containing the full text of the <action>
"action": "Click the blue button,
// "PASSED" if the instruction was evaluated, "FAILED" if the instruction could not be evaluated, or "SKIPPED" if journey evaluation ended early because an instruction failed
"status": "PASSED",
// A list of the ADB commands executed while evaluating the instruction,
"commands": [ "adb input swipe 490 200 500 500 500", "adb input tap 45 920" ],
// Failure reasons, feedback, or other useful information
"comment": "The journey step doesn't specify that the button requires scrolling to see",
},
{
"action": "The home screen is shown",
"status": "FAILED",
"comment": "The settings page was shown",
},
]
}
```
@@ -9,6 +9,7 @@ description: Provides a structured workflow for migrating an Android XML View to
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-05-06'
keywords:
- Jetpack Compose
- migration
@@ -120,4 +121,4 @@ verified, write a Compose UI test for the new composable.
### Step 10: XML code removal
Delete the migrated XML file and its associated legacy tests. **Caution:** Only
remove code and resources that are not referenced by other parts of the project.
remove code and resources that are not referenced by other parts of the project.
@@ -15,9 +15,9 @@ Material 3 Compose theming.
| Term | Definition |
|---|---|
| `MaterialTheme` | The composable function that provides theming (colors, typography, shapes) to Compose UI components. |
| `Shape` | A Compose object used to define custom component shapes for a `MaterialTheme`. |
| `Shapes` | A Compose object used to define custom component shapes for a `MaterialTheme`. |
| `Typography` | A Compose object used to define custom text styles (font families, sizes, weights) for a `MaterialTheme`. |
| `Color` | A Compose object used to define custom color schemes for `MaterialTheme`. |
| `ColorScheme` | A Compose object used to define custom color schemes for `MaterialTheme`. |
| XML Theme | The Android theming system defined in XML files, used by the View system. |
## Limitations
@@ -79,8 +79,8 @@ Material 3 Compose.
- If your app uses custom shapes:
1. In your Compose code, define a `Shape` object to replicate your XML shape definitions.
2. Provide this `Shape` object to your `MaterialTheme`.
1. In your Compose code, define a `Shapes` object to replicate your XML shape definitions.
2. Provide this `Shapes` object to your `MaterialTheme`.
For more details, see [shapes](https://developer.android.com/develop/ui/compose/designsystems/material3#shapes).
- If your app uses custom typography:
@@ -111,6 +111,7 @@ Material 3 Compose.
## Step 5: Migrate styles (styles.xml)
XML styles (styles.xml) system defines styles and appearance of:
1. Widgets, components, themes for windows and dialogs
2. Typography
3. Themes and overlays
@@ -118,12 +119,14 @@ XML styles (styles.xml) system defines styles and appearance of:
XML Views and components combine multiple attributes to create a style.
They set their styles from styles.xml in two different ways:
1. Setting "style="@style/..." directly and explicitly in the XML View
2. Setting the style indirectly and implicitly for a component as part of a larger Theme (theme.xml)
Styles have no direct equivalent in Compose - instead styles are passed as:
parameters to composables, defined in the AppTheme, or by creating layered,
reusable composable variations with the defined style.
Styles have no **direct** equivalent in Compose - instead styles are passed as:
parameters or modifiers to composables, using the
[new, experimental Styles API](https://developer.android.com/develop/ui/compose/styles) defined in the AppTheme, or by creating
layered, reusable composable variations with the defined style.
Provide separate @Composable functions named according to the style and the
base component, to signify the difference in styling and use cases for those
@@ -139,11 +142,11 @@ components.
| XML | Compose |
|---|---|
| `Theme.MaterialComponents.*` | `MaterialTheme(colorScheme, typography, shapes) { }` |
| `Theme.Material3.*` | `MaterialTheme(colorScheme, typography, shapes) { }` |
| `TextAppearance.Material3.BodyMedium` | `TextStyle(...)` defined in `Typography(bodyMedium = ...)` |
| `ShapeAppearance.*.SmallComponent` | `Shapes(small = RoundedCornerShape(X.dp))` |
| `Widget.MaterialComponents.Button` | `Button(colors = ButtonDefaults.buttonColors(...))` |
| `Widget.MaterialComponents.CardView` | `Card(shape=..., elevation=..., colors=...)` |
| `Widget.Material3.Button` | `Button(colors = ButtonDefaults.buttonColors(...))` |
| `Widget.Material3.CardView` | `Card(shape=..., elevation=..., colors=...)` |
| `Widget.*.TextInputLayout.OutlinedBox` | `OutlinedTextField(colors = OutlinedTextFieldDefaults.colors(...))` |
| `Widget.*.Chip.Filter` | `FilterChip(colors = FilterChipDefaults.filterChipColors(...))` |
| `Widget.*.Toolbar.Primary` | `TopAppBar(colors = TopAppBarDefaults.topAppBarColors(...))` |
@@ -160,7 +163,7 @@ components.
## Step 6: Validate the theme migration
Always use the existing theme values from the original XML theme as the source
of truth for the new Material Theme in Compose
of truth for the new Material Theme in Compose.
Never invent new theme values during migration, to maintain brand consistency
and avoid visual regressions.
+2 -1
View File
@@ -8,6 +8,7 @@ description: Learn how to install and migrate to Jetpack Navigation 3, and how t
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-05-05'
keywords:
- recipe
- Android
@@ -106,4 +107,4 @@ Code examples showcasing common patterns.
### Returning results
- *[Returning Results as Events](references/android/guide/navigation/navigation-3/recipes/results-event.md)* : Returning results as events to content in another `NavEntry`
- *[Returning Results as State](references/android/guide/navigation/navigation-3/recipes/results-state.md)* : Returning results as state stored in a `CompositionLocal`
- *[Returning Results as State](references/android/guide/navigation/navigation-3/recipes/results-state.md)* : Returning results as state stored in a `CompositionLocal`
+2 -1
View File
@@ -7,6 +7,7 @@ description: Analyzes Android build files and R8 keep rules to identify redundan
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-04-25'
keywords:
- R8
- proguard
@@ -37,4 +38,4 @@ metadata:
- Don't mention the generated files.
- Don't mention exceptions that occur during execution.
- Don't mention the benefits of R8
- Don't mention any files of this skill
- Don't mention any files of this skill
@@ -6,6 +6,7 @@ description: Use this skill when upgrading or migrating an Android project from
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-04-13'
keywords:
- android
- play billing
@@ -89,4 +90,4 @@ Explain the "Why" to the developer:
- "I updated your SDK to \[Version\] because PBL \[Version\] requires it for \[Reason from docs\]."
- "I removed your custom `retryConnection()` logic because it is now handled natively by the library using `enableAutoServiceReconnection()`."
- "Successfully upgraded from PBL \[Old\] to PBL \[New\] and verified with unit tests. Based on an analysis of features in the latest library and this application's current feature set, I suggest exploring \[New Feature\] (e.g., Prepaid Plans or Installments) from the latest release because it is now available but not yet implemented."
- "Successfully upgraded from PBL \[Old\] to PBL \[New\] and verified with unit tests. Based on an analysis of features in the latest library and this application's current feature set, I suggest exploring \[New Feature\] (e.g., Prepaid Plans or Installments) from the latest release because it is now available but not yet implemented."
+146
View File
@@ -0,0 +1,146 @@
---
name: perfetto-sql
description: Translates natural language data intents into syntactically valid Perfetto
SQL queries and executes them against a local trace file. Use this skill to extract
slice, thread, or memory data from Android Perfetto traces using trace_processor.
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-05-07'
keywords:
- Android
- Perfetto SQL
- Query Guidelines
- Performance Profiling
- Trace Analysis
- SQL Best Practices
- SPAN_JOIN
- Idempotency
---
## Guidelines and Hints
- **Idempotency:** Ensure queries are idempotent to prevent "already exists" errors during multiple executions.
- For Perfetto objects, always use `CREATE OR REPLACE`: `CREATE OR REPLACE
PERFETTO TABLE`, `CREATE OR REPLACE PERFETTO VIEW`, `CREATE OR REPLACE
PERFETTO FUNCTION`, `CREATE OR REPLACE PERFETTO MACRO`.
- For SQLite Virtual Tables (such as `SPAN_JOIN`), `CREATE OR REPLACE` is not supported. Explicitly drop them first: `DROP TABLE IF EXISTS
my_table; CREATE VIRTUAL TABLE my_table USING SPAN_JOIN(...);`
- For standard SQLite indexes, prepend `DROP INDEX IF EXISTS index_name;`.
- `SPAN_JOIN` will crash if intervals **within the same input table** overlap. Always use the `PARTITIONED {column}` (for example, `PARTITIONED upid`) clause to isolate intervals.
- Intermediate tables fed into a `SPAN_JOIN` must be materialized using `CREATE PERFETTO TABLE`, not `CREATE VIEW`.
- **Trace Boundaries (`dur = -1`):** Slices or thread states that don't finish before the trace ends are recorded with `dur = -1`. When calculating a bounding box (for example, `ts + dur`) or summing durations (`SUM(dur)`), handle incomplete durations using: `IIF(dur = -1, trace_end() - ts, dur)`.
- **Robust State Transitions:** Avoid manual timestamp arithmetic (for example, `ts + dur = next.ts`) to join adjacent events. Rely on standard library modules (for example, `sched.runnable`, `linux.perf.counters`, `intervals.overlap`) which safely handle trace gaps and preemptions.
- **Unique Identifiers:** When writing SQL queries in Perfetto, you must join tables using `utid` (unique thread ID) or `upid` (unique process ID) instead of the regular `tid` or `pid`. **Why it's useful** : The operating system recycles `TIDs` and `PIDs`, while `UTIDs` and `UPIDs` remain unique for the lifetime of the trace, which prevents incorrect joins.
- **Safe Argument Extraction:** Use `EXTRACT_ARG(arg_set_id, 'key')` to extract dictionary or JSON-like properties from slices or tracks. Don't attempt string parsing.
- **String Matching (Always use GLOB):** Use `GLOB` instead of `LIKE`. `LIKE` causes performance bottlenecks and treats underscores (`_`) as wildcards, leading to bugs.
- **Exact matches:** Use `=`.
- **Substring matches:** Use `GLOB` with `*` (for example, `name GLOB
'*RenderThread*'`).
- **Case-insensitive matches:** Use `LOWER(name) GLOB` and make sure the search string is fully lowercase (for example, `LOWER(name) GLOB
'*renderthread*'`). Use this when dealing with inconsistent trace capitalization (for example, `WakeLock` versus `wakelock`).
- **Calculating Time Overlaps:** To calculate the overlap duration between two
time intervals `[start1, end1]` and `[start2, end2]`:
> **Precedence Rule:** Always prefer using `SPAN_JOIN` or standard library
> functions (for example, `intervals.overlap`) to calculate overlaps
> **between two different sets of intervals** . Avoid manual arithmetic if a
> standard library feature or `SPAN_JOIN` can achieve the same result.
> Use the following logic if no built-in alternative exists.
1. **Condition:** The intervals overlap if `start1 < end2` and `start2 <
end1`.
2. **Duration:** The overlap duration is calculated as `MIN(end1, end2) -
MAX(start1, start2)`
> **Important:** Incomplete Perfetto slices have a duration
> of -1 (`dur = -1`). Always calculate the effective end time using
> `ts + IIF(dur = -1, trace_end() - ts, dur)` before applying
> this logic.
- Query `android_thread_slices_for_all_startups` for app startup requests.
- Join `counter_track` with `counter` to get values of counter with a specific
name.
- When querying for a CPU frequency counter, include the `linux.cpu.frequency`
module and use the `cpu_frequency_counters` table.
- When looking for events around a specific timestamp, start with 100ms as the
window size.
- Always prefix column names with table or view alias, that is:
`{alias}.{column_name}`.
- To calculate the total time spent in slices matching a specific name pattern
(for example, `*{name_pattern}*`), you must sum their durations. **Why it's
useful** : This helps quantify the total impact of a specific function or
feature on performance across multiple calls. Here is an example query
(note the safe handling of incomplete slices):
`sql
SELECT
count(*) as total_count,
sum(IIF(slice.dur = -1, trace_end() - slice.ts, slice.dur)) / 1000000.0 as total_dur_ms
FROM slice
WHERE slice.name GLOB '*{name_pattern}*';`
## Resources
- **Documentation:** The Perfetto Standard Library documentation is in [`references/perfetto-stdlib-docs.md`](references/perfetto-stdlib-docs.md). Use this file as a reference to discover available modules, find schemas (columns and types) for specific tables or views, or determine the `INCLUDE PERFETTO MODULE` statements required before drafting SQL query.
- **Execution Tool:** Queries are executed using the official `trace_processor` wrapper script downloaded directly from Perfetto. Output is returned in pure CSV format.
## Execution Protocol
You must follow these steps sequentially, mirroring a multi-agent pipeline:
### Step 0: Tool Setup
**Fetch the Wrapper:** If you don't have `trace_processor` in your current
working directory or in your path, download it directly from the Perfetto index:
`curl -LO https://get.perfetto.dev/trace_processor && chmod +x
./trace_processor`
> **Important:** The file served at this URL is a `~10KB` Python
> wrapper script. Don't assume the download failed because it is human-readable
> text. This is the intended behavior. This script handles lazy-loading the real
> binary into `~/.local/share/perfetto/` on its first run. Use it directly.
### Step 1: Dissection and Schema Research
1. Identify the core question, required data points, and filtering conditions.
2. **Precedence Rule:** If the user's request contains a SQL query, use it **without modification** and skip to Step 2 for validation.
3. **Mandatory Schema and Module Search:** For every table or view you plan to use, you MUST find its schema in [`references/perfetto-stdlib-docs.md`](references/perfetto-stdlib-docs.md). **Don't read the entire documentation file** --- it consumes the context window. Follow this precise workflow:
- **Discovery and Search:** Use available search tools (`grep`, `read_file` or file search) with line limits to discover relevant views, tables or modules based on your problem domain and high-level intents (for example, 'CPU time', 'running time', 'overlap', 'jank').
- **Why:** Searching solely for exact table names misses comprehensive, pre-computed views built for these analyses.
- **Note:** You must verify if a Standard Library module already provides the needed abstraction before drafting manual arithmetic or custom functions.
- **Targeted Bounded Reads:** Once you identify the relevant modules, efficiently read the tables and views within that module section.
- **Extract:** Extract only the schema, columns, and the exact `INCLUDE PERFETTO MODULE` statements for the required object from the documentation.
- **Verify:** Review the columns, types, and descriptions to ensure the table matches your needs.
4. Print the research results before drafting the query:
5. *Tables/Views:* `Schema for {name}:` listing columns and types.
### Step 2: Draft and Validate Loop (Max 3 Iterations)
Draft the SQL query in SQLite syntax using **only** the schemas
retrieved in Step 1. After drafting, you must validate against this checklist:
- \[ \] **SQLite Syntax:** Does the query parse successfully without syntax errors?
- \[ \] **Idempotency:** Are all object creations safe to re-run? (Did you use `CREATE OR REPLACE PERFETTO` and `DROP TABLE IF EXISTS` for virtual tables?)
- \[ \] **Existence:** Were all tables found in the documentation?
- \[ \] **Intent Check:** Is there a pre-existing standard library table or view that will fulfill this intent before instead of writing manual arithmetic?
- \[ \] **Column Accuracy:** Do columns match the retrieved schemas?
- \[ \] **Alias Check:** Are ALL column names prefixed with their table or view alias (for example, `alias.column_name`)?
- \[ \] **Module Check:** Are `INCLUDE PERFETTO MODULE` statements included for all non-prelude modules? **You must use the exact module names provided in
the documentation.**
- \[ \] **Span Join Check:** If using `SPAN_JOIN`, are tables safely `PARTITIONED` to prevent overlapping interval crashes? Are intermediate tables materialized with `CREATE PERFETTO TABLE`?
- \[ \] **No LIKE Constraint:** Did you map string matches using `GLOB` or `=` instead of prohibited `LIKE`?
- \[ \] **Execution Check:** You MUST run queries using the standalone
`./trace_processor` wrapper with the `--query-string` flag:
`./trace_processor --query-string "QUERY" {trace_file}`.
**Execution Rules:**
- **File Usage** : If you must create a SQL file to execute queries (for example, due to query length or escaping issues), you must create them in the `/tmp/` directory.
- **State:** The execution is purely ephemeral. Database state does not persist across turns. You **cannot** share state (like views or tables) across queries in different turns. Every query must be standalone and fully self-contained.
- **Failure Resilience:** Debug and fix SQL syntax and logic errors when query fails.Don't simplify the analytical intent to pass validation. For example, if requested to calculate an overlap or intersection, you must fix the intersection math. Don't substitute with disjoint queries (for example, returning independent total durations) as a workaround.
### Step 3: Final Output
1. Explicitly return and state the final validated SQL and explain the results to the user.
2. Before finishing your response, delete all temporary SQL files you created in `/tmp/` directory.
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -7,6 +7,7 @@ description: Use this skill to migrate your Jetpack Compose app to add adaptive
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-04-01'
keywords:
- android
- compose
@@ -422,4 +423,4 @@ Dialog(
- \[ \] Does every `TextField`, `OutlinedTextField`, or `BasicTextField` have a parent with `imePadding()`, `fitInside`, `Modifier.safeDrawingPadding()`, `Modifier.safeContentPadding()`, `Modifier.safeGesturesPadding()`, or `contentWindowInsets` set to `WindowInsets.safeDrawing` or `WindowInsets.ime`?
- \[\] Does the first and last list item draw away from the system bars by passing insets to `contentPadding`?
- \[\] Do FABs draw above the navigation bars by either being inside a Scaffold or by applying `Modifier.safeDrawingPadding()`?
- \[\] Does the project build? Run `./gradlew build` to be sure.
- \[\] Does the project build? Run `./gradlew build` to be sure.
@@ -9,6 +9,7 @@ description: Provides guidelines for developing projected applications for Andro
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-05-08'
keywords:
- Jetpack Compose Glimmer
- AI Glasses
@@ -319,4 +320,4 @@ component.
- For a detailed breakdown of notifications on AI Glasses, see [Understand
notification behavior for AI glasses](references/android/develop/xr/jetpack-xr-sdk/ai-glasses/notifications/behavior.md) and learn how to [Start a glasses
activity on display AI glasses from a notification](references/android/develop/xr/jetpack-xr-sdk/ai-glasses/notifications/start-activity.md).
activity on display AI glasses from a notification](references/android/develop/xr/jetpack-xr-sdk/ai-glasses/notifications/start-activity.md).
@@ -28,7 +28,7 @@ Add the following [library dependencies for AI glasses](https://developer.androi
### Groovy
dependencies {
implementation "androidx.xr.runtime:runtime:1.0.0-alpha12"
implementation "androidx.xr.runtime:runtime:1.0.0-alpha13"
implementation "androidx.xr.glimmer:glimmer:1.0.0-alpha11"
implementation "androidx.xr.glimmer:glimmer-google-fonts:1.0.0-alpha11"
implementation "androidx.xr.projected:projected:1.0.0-alpha06"
@@ -38,7 +38,7 @@ Add the following [library dependencies for AI glasses](https://developer.androi
### Kotlin
dependencies {
implementation("androidx.xr.runtime:runtime:1.0.0-alpha12")
implementation("androidx.xr.runtime:runtime:1.0.0-alpha13")
implementation("androidx.xr.glimmer:glimmer:1.0.0-alpha11")
implementation("androidx.xr.glimmer:glimmer-google-fonts:1.0.0-alpha11")
implementation("androidx.xr.projected:projected:1.0.0-alpha06")
@@ -33,11 +33,11 @@ import androidx.xr.glimmer.ButtonSize
import androidx.xr.glimmer.GlimmerTheme
import androidx.xr.glimmer.Icon
import androidx.xr.glimmer.Text
import androidx.xr.glimmer.list.VerticalList
import androidx.xr.glimmer.list.GlimmerLazyColumn
@Composable
fun ButtonSampleUsage() {
VerticalList(
GlimmerLazyColumn(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxSize().wrapContentSize(Alignment.Center),
) {
@@ -72,9 +72,9 @@ import androidx.compose.ui.unit.dp
* the provided [buttonSize] will affect other properties such as padding values and the size of
* icons.
* @param leadingIcon optional leading icon to be placed before the [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after the [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this button, and also used to draw the background and
* border
* @param color background color of this button
@@ -38,11 +38,11 @@ import androidx.xr.glimmer.Card
import androidx.xr.glimmer.GlimmerTheme
import androidx.xr.glimmer.Icon
import androidx.xr.glimmer.Text
import androidx.xr.glimmer.list.VerticalList
import androidx.xr.glimmer.list.GlimmerLazyColumn
@Composable
fun CardSampleUsage() {
VerticalList {
GlimmerLazyColumn {
item { CardSample() }
item { CardWithTrailingIconSample() }
item { CardWithTitleAndSubtitleAndLeadingIconSample() }
@@ -88,9 +88,9 @@ import kotlin.math.max
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
* aspect ratio.
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
* @param color background color of this card
* @param contentColor content color used by components inside [content], [title], [subtitle],
@@ -184,9 +184,9 @@ public fun Card(
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
* aspect ratio.
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
* @param color background color of this card
* @param contentColor content color used by components inside [content], [title], [subtitle],
@@ -270,9 +270,9 @@ public fun Card(
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
* aspect ratio.
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
* @param color background color of this card
* @param contentColor content color used by components inside [content], [title], [subtitle],
@@ -44,8 +44,8 @@ import androidx.compose.ui.unit.dp
/**
* ListItem is a component used to represent a single item in a
* [androidx.xr.glimmer.list.VerticalList]. A ListItem has a primary label [content], and may also
* have any combination of [supportingLabel], [leadingIcon], and [trailingIcon]. The supporting
* [androidx.xr.glimmer.list.GlimmerLazyColumn]. A ListItem has a primary label [content], and may
* also have any combination of [supportingLabel], [leadingIcon], and [trailingIcon]. The supporting
* label is displayed below the primary label and can be used to provide additional information. A
* ListItem fills the maximum width available by default.
*
@@ -66,9 +66,9 @@ import androidx.compose.ui.unit.dp
* @param supportingLabel optional supporting label to be placed underneath the primary label
* [content]
* @param leadingIcon optional leading icon to be placed before the primary label [content]. This is
* typically an [Icon].
* typically an [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after the primary label [content]. This
* is typically an [Icon].
* is typically an [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this list item, and also used to draw the background and
* border
* @param color background color of this list item
@@ -115,8 +115,8 @@ public fun ListItem(
/**
* ListItem is a component used to represent a single item in a
* [androidx.xr.glimmer.list.VerticalList]. A ListItem has a primary label [content], and may also
* have any combination of [supportingLabel], [leadingIcon], and [trailingIcon]. The supporting
* [androidx.xr.glimmer.list.GlimmerLazyColumn]. A ListItem has a primary label [content], and may
* also have any combination of [supportingLabel], [leadingIcon], and [trailingIcon]. The supporting
* label is displayed below the primary label and can be used to provide additional information. A
* ListItem fills the maximum width available by default.
*
@@ -139,9 +139,9 @@ public fun ListItem(
* @param supportingLabel optional supporting label to be placed underneath the primary label
* [content]
* @param leadingIcon optional leading icon to be placed before the primary label [content]. This is
* typically an [Icon].
* typically an [Icon] tinted with [contentColor] by default.
* @param trailingIcon optional trailing icon to be placed after the primary label [content]. This
* is typically an [Icon].
* is typically an [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this list item, and also used to draw the background and
* border
* @param color background color of this list item
@@ -51,6 +51,7 @@ import androidx.compose.ui.util.fastForEach
import androidx.compose.ui.util.fastMap
import androidx.compose.ui.util.lerp
import androidx.compose.ui.zIndex
import androidx.xr.glimmer.internal.SingleItemScrollConstraintConnection
import kotlin.math.roundToInt
/**
@@ -37,11 +37,11 @@ import androidx.xr.glimmer.Icon
import androidx.xr.glimmer.Text
import androidx.xr.glimmer.TitleChip
import androidx.xr.glimmer.TitleChipDefaults
import androidx.xr.glimmer.list.VerticalList
import androidx.xr.glimmer.list.GlimmerLazyColumn
@Composable
fun TitleChipSampleUsage() {
VerticalList(
GlimmerLazyColumn(
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier.fillMaxSize().wrapContentSize(Alignment.Center),
) {
@@ -58,7 +58,7 @@ import androidx.compose.ui.unit.dp
* @sample androidx.xr.glimmer.samples.TitleChipWithCardSample
* @param modifier the [Modifier] to be applied to this title chip
* @param leadingIcon optional leading icon to be placed before the [content]. This is typically an
* [Icon].
* [Icon] tinted with [contentColor] by default.
* @param shape the [Shape] used to clip this title chip, and also used to draw the background and
* border
* @param color background color of this title chip