Individual skill
glance-canonical-layouts
Use this skill to create home screen widgets using Jetpack Glance Canonical Layouts from the Android Platform Samples project, or when asked to implement standard widget layout patterns (including Check List, Image Grid, Snap Scrolling, and Standard Toolbar).
system/glance-canonical-layouts/SKILL.md
Source commit 6daa53ef27fa2aa87827d183a85c06cedceca833
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 3, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 10,400
- Repository last updated
- Nov 5, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- skills Repository topic
- engineering Derived category
Declared tags are partial or unavailable.
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 24,521 bytesreferences/ActionDemonstrationActivity.ktasset · 1,629 bytesreferences/CanonicalLayoutActivity.ktasset · 14,076 bytesreferences/CollectionsKtx.ktasset · 1,323 bytesreferences/collections/ActionListAppWidget.ktasset · 3,360 bytesreferences/collections/CheckListAppWidget.ktasset · 3,623 bytesreferences/collections/ImageGridAppWidget.ktasset · 3,393 bytesreferences/collections/ImageTextListAppWidget.ktasset · 3,519 bytesreferences/collections/data/FakeActionListDataRepository.ktasset · 4,606 bytesreferences/collections/data/FakeCheckListDataRepository.ktasset · 3,853 bytesreferences/collections/data/FakeImageGridDataRepository.ktasset · 8,375 bytesreferences/collections/data/FakeImageTextListDataRepository.ktasset · 7,330 bytesreferences/collections/layout/ActionListLayout.ktasset · 20,141 bytesreferences/collections/layout/CheckListLayout.ktasset · 17,067 bytesreferences/collections/layout/EmptyListContent.ktasset · 900 bytesreferences/collections/layout/ImageGridLayout.ktasset · 13,655 bytesreferences/collections/layout/ImageTextListLayout.ktasset · 17,444 bytesreferences/collections/layout/ListItem.ktasset · 3,168 bytesreferences/collections/layout/NoDataContent.ktasset · 2,765 bytesreferences/collections/layout/RoundedScrollingLazyColumn.ktasset · 2,875 bytesreferences/collections/layout/RoundedScrollingLazyVerticalGrid.ktasset · 4,354 bytesreferences/collections/layout/VerticalListItem.ktasset · 3,507 bytesreferences/res/drawable/four_side_cookie_background.xmlasset · 1,445 bytesreferences/res/drawable/sample_ac_icon.xmlasset · 1,385 bytesreferences/res/drawable/sample_add_icon.xmlasset · 315 bytesreferences/res/drawable/sample_app_logo.xmlasset · 1,120 bytesreferences/res/drawable/sample_arrow_right_icon.xmlasset · 365 bytesreferences/res/drawable/sample_bulb_icon.xmlasset · 651 bytesreferences/res/drawable/sample_camera_icon.xmlasset · 1,235 bytesreferences/res/drawable/sample_checked_circle_icon.xmlasset · 402 bytesreferences/res/drawable/sample_circle_icon.xmlasset · 415 bytesreferences/res/drawable/sample_delete_icon.xmlasset · 389 bytesreferences/res/drawable/sample_door_icon.xmlasset · 810 bytesreferences/res/drawable/sample_edit_icon.xmlasset · 520 bytesreferences/res/drawable/sample_file_upload_icon.xmlasset · 1,062 bytesreferences/res/drawable/sample_grid_icon.xmlasset · 968 bytesreferences/res/drawable/sample_heart_icon.xmlasset · 1,149 bytesreferences/res/drawable/sample_home_icon.xmlasset · 517 bytesreferences/res/drawable/sample_image_icon.xmlasset · 846 bytesreferences/res/drawable/sample_info_icon.xmlasset · 449 bytesreferences/res/drawable/sample_mic_icon.xmlasset · 1,284 bytesreferences/res/drawable/sample_no_data_icon.xmlasset · 546 bytesreferences/res/drawable/sample_pin_icon.xmlasset · 488 bytesreferences/res/drawable/sample_power_settings_icon.xmlasset · 499 bytesreferences/res/drawable/sample_refresh_icon.xmlasset · 490 bytesreferences/res/drawable/sample_scrim_gradient.xmlasset · 1,476 bytesreferences/res/drawable/sample_search_icon.xmlasset · 1,184 bytesreferences/res/drawable/sample_share_icon.xmlasset · 711 bytesreferences/res/drawable/sample_snooze_icon.xmlasset · 569 bytesreferences/res/drawable/sample_text_icon.xmlasset · 491 bytesreferences/res/drawable/sample_thermostat_icon.xmlasset · 937 bytesreferences/res/drawable/sample_videocam_icon.xmlasset · 1,066 bytesreferences/res/values/dimens.xmlasset · 8,589 bytesreferences/res/values/strings.xmlasset · 5,985 bytesreferences/res/xml/sample_action_list_widget_info.xmlasset · 1,753 bytesreferences/res/xml/sample_check_list_widget_info.xmlasset · 1,817 bytesreferences/res/xml/sample_expressive_toolbar_widget_info.xmlasset · 1,649 bytesreferences/res/xml/sample_full_bleed_image_widget_info.xmlasset · 1,432 bytesreferences/res/xml/sample_image_grid_widget_info.xmlasset · 1,744 bytesreferences/res/xml/sample_image_text_list_widget_info.xmlasset · 1,829 bytesreferences/res/xml/sample_long_text_widget_info.xmlasset · 1,511 bytesreferences/res/xml/sample_search_toolbar_widget_info.xmlasset · 1,584 bytesreferences/res/xml/sample_text_with_image_widget_info.xmlasset · 1,588 bytesreferences/res/xml/sample_toolbar_widget_info.xmlasset · 1,550 bytesreferences/text/FullBleedImageAppWidget.ktasset · 3,625 bytesreferences/text/LongTextAppWidget.ktasset · 3,160 bytesreferences/text/TextWithImageAppWidget.ktasset · 3,864 bytesreferences/text/data/FakeLongTextRespository.ktasset · 3,036 bytesreferences/text/data/FakeTextWithImageRepository.ktasset · 6,069 bytesreferences/text/layout/FullBleedImageLayout.ktasset · 7,884 bytesreferences/text/layout/LongTextLayout.ktasset · 12,115 bytesreferences/text/layout/TextWithImageLayout.ktasset · 17,290 bytesreferences/toolbars/ExpressiveToolbarAppWidget.ktasset · 3,815 bytesreferences/toolbars/SearchToolBarAppWidget.ktasset · 3,275 bytesreferences/toolbars/ToolBarAppWidget.ktasset · 3,504 bytesreferences/toolbars/layout/Buttons.ktasset · 4,752 bytesreferences/toolbars/layout/ExpressiveToolbarLayout.ktasset · 15,231 bytesreferences/toolbars/layout/LayoutComponents.ktasset · 5,693 bytesreferences/toolbars/layout/SearchToolBarLayout.ktasset · 14,998 bytesreferences/toolbars/layout/ToolBarLayout.ktasset · 16,248 bytesreferences/ui/theme/Color.ktasset · 313 bytesreferences/ui/theme/Theme.ktasset · 2,122 bytesreferences/ui/theme/Type.ktasset · 992 bytesreferences/utils/ActionUtils.ktasset · 780 bytesreferences/utils/FontUtils.ktasset · 3,573 bytesreferences/utils/ImageAspectRatio.ktasset · 1,063 bytesreferences/utils/ImageUtils.ktasset · 5,383 bytesreferences/utils/PreviewAnnotations.ktasset · 3,064 bytes
Read excerpt
To implement a widget Canonical Layout that follows the recommended design
patterns:
1. The project **MUST** use Jetpack Glance.
2. You **MUST** locate the requested layout from the list under **Canonical Layout Reference Files**.
3. Copy the layout reference files into your project's target app module (e.g., `src/main/java/` and `src/main/res/`) in one step to implement the exact design and reduce the number of tool calls.
4. You **MUST** set override val `sizeMode: SizeMode = SizeMode.Exact` in the widget provider class.
5. Validate that your project compiles, updating sample package declarations, import paths, and class names to match the target app's package name.
6. Clean your project's widget code, removing unused classes (for example, unused buttons).
7. You **MUST** register the widget receiver in `AndroidManifest.xml` inside `<application>` after `<activity>`, ensuring `android:resource="@xml/..."` matches the filename of the copied Widget Info XML. Otherwise, the widget won't appear in the widget picker:
<br />
```xml