glance-canonical-layouts

Implement Jetpack Glance canonical layouts for Android home screen widgets.

9.3k|601|Updated Mar 16, 2026
Ready to run
npx skills add https://github.com/android/skills --skill glance-canonical-layouts-android
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: glance-canonical-layouts
Source: https://github.com/android/skills/tree/main/system/glance-canonical-layouts
Command: npx skills add https://github.com/android/skills --skill glance-canonical-layouts-android

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? This Skill eliminates the need for manual implementation of standard widget layouts by providing reference files and instructions for Jetpack Glance canonical patterns. ## Core Features & Use Cases - Action List: Display tappable items with icons and text. - Check List: Tasks with checkboxes for state management. - Image Grid: Scrollable image galleries. - Use Case: Implement recommended home screen widgets following Android design guidelines. ## Quick Start Copy the layout files from the references directory into your project and register the widget receiver in the AndroidManifest.xml.

Frequently Asked Questions about glance-canonical-layouts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a widget using Jetpack Glance canonical layouts?▼

Use the provided reference files for the desired layout type such as action_list or check_list and copy them into your project.

What dependencies are required for Jetpack Glance widgets?▼

Add androidx.glance:glance-appwidget and androidx.glance:glance-material3 to your build.gradle.kts file.

How to register a Glance widget in AndroidManifest.xml?▼

Add a receiver with the appwidget provider metadata after the activity tag.

What is the purpose of setting sizeMode to Exact in the widget provider?▼

It ensures the widget uses the exact size specified in the dimens.xml file.

Can I use this skill for snap scrolling widgets?▼

Yes, for Glance 1.3.0-alpha02 or higher with compileSdk 37.