/android-skills:glance-canonical-layoutsfrom Android Skills
Creates home screen widgets using Jetpack Glance Canonical Layouts from Android Platform Samples. Implements standard widget patterns like Check List, Image Grid, Snap Scrolling, and Standard Toolbar.
Ships in Android Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
To implement a widget Canonical Layout that follows the recommended design patterns:
src/main/java/ and src/main/res/) in one step to implement the exact design and reduce the number of tool calls.sizeMode: SizeMode = SizeMode.Exact in the widget provider class.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:<receiver android:name=".glance.MyReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/my_app_widget_info" />
</receiver>
Add Jetpack Glance dependencies to the app module's build.gradle.kts
(dependencies block):
androidx.glance:glance-appwidget:1.2.0 or higherandroidx.glance:glance-material3:1.2.0 or higherandroidx.glance:glance-appwidget-preview:1.2.0 or higherandroidx.glance:glance-preview:1.2.0 or higherUse version 1.3.0-alpha02 or higher with compileSdk = 37 and Android Gradle
Plugin (AGP) 9.1.0 or higher (for example, agp = "9.1.0" in
gradle/libs.versions.toml) when implementing Snap Scrolling.
If copying sample data repositories that load bitmaps with Coil (such as
FakeImageGridDataRepository.kt, FakeImageTextListDataRepository.kt, or
FakeTextWithImageRepository.kt), also add an image loading library dependency
such as io.coil-kt:coil (e.g., implementation("io.coil-kt:coil:2.7.0")) if
one doesn't already exist.
If copying FontUtils.kt (for long text, full-bleed image, or text with image
layouts), also add androidx.appcompat:appcompat. For example, add
implementation("androidx.appcompat:appcompat:1.8.0") if it
doesn't already exist. FontUtils.kt uses AppCompatTextView so text
auto-sizing also works below API level 27.
action_list)check_list)actionRunCallback, ActionCallback(actionParametersOf(...) or actionStartActivity(...)) for widget onClick parameters to handle click events like tapping a checkbox.expressive_toolbar)ColorProvider import errors: import androidx.glance.unit.ColorProvider and use androidx.glance.color.ColorProvider(dayColor, nightColor).GlanceModifier.background(Color) directly for solid background colors rather than ColorProvider.image_grid)GlanceModifier.background) or local drawables for image items unless an image loading library is configured or requested.image_text_list)long_text)androidx.compose.ui.unit.times if multiplying Dp (for example, 2 * padding).search_toolbar)ColorProvider import errors: import androidx.glance.unit.ColorProvider and use androidx.glance.color.ColorProvider(dayColor, nightColor).GlanceModifier.background(Color) directly for solid background colors rather than ColorProvider.snap_scrolling)verticalScrollMode = VerticalScrollMode.SnapScrollMatchHeight(size.height) on LazyColumn for Snap Scrolling.standard_toolbar)ColorProvider import errors: use androidx.glance.color.ColorProvider(dayColor, nightColor).ColorProvider.text_with_image)GlanceModifier.background(Color) directly for solid background colors rather than ColorProvider, otherwise the background will be transparent.ColorProvider (outside of the background), avoid import errors :
import androidx.glance.unit.ColorProviderandroidx.glance.color.ColorProvider(dayColor, nightColor)minWidth, minHeight, and minResizeHeight unchanged?android:minWidth and android:minHeight in appwidget-provider XML definitions?val sizeMode: SizeMode = SizeMode.Exact in the widget provider class?references/ActionDemonstrationActivity.kt (opens in a new tab)references/CanonicalLayoutActivity.kt (opens in a new tab)references/CollectionsKtx.kt (opens in a new tab)references/collections/ActionListAppWidget.kt (opens in a new tab)references/collections/CheckListAppWidget.kt (opens in a new tab)references/collections/ImageGridAppWidget.kt (opens in a new tab)references/collections/ImageTextListAppWidget.kt (opens in a new tab)references/collections/data/FakeActionListDataRepository.kt (opens in a new tab)references/collections/data/FakeCheckListDataRepository.kt (opens in a new tab)references/collections/data/FakeImageGridDataRepository.kt (opens in a new tab)references/collections/data/FakeImageTextListDataRepository.kt (opens in a new tab)references/collections/layout/ActionListLayout.kt (opens in a new tab)references/collections/layout/CheckListLayout.kt (opens in a new tab)references/collections/layout/EmptyListContent.kt (opens in a new tab)references/collections/layout/ImageGridLayout.kt (opens in a new tab)references/collections/layout/ImageTextListLayout.kt (opens in a new tab)references/collections/layout/ListItem.kt (opens in a new tab)references/collections/layout/NoDataContent.kt (opens in a new tab)references/collections/layout/RoundedScrollingLazyColumn.kt (opens in a new tab)references/collections/layout/RoundedScrollingLazyVerticalGrid.kt (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub android/skills --plugin android-skills42 skills in this plugin
/adaptiveInstructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto, and XR. It includes how to handle different window sizes, pointing devices (such as mouse) and text entry devices (such as keyboard) using the Compose MediaQuery API, and how to preserve UI, navigation, scroll, and media playback state across configuration changes (such as folding/unfolding a foldable, rotating a device, or resizing a window). It also covers multi-pane layouts using Navigation3 Scenes, adaptive UI components (such as buttons) with varying target sizes, and adaptive layouts (including navigation areas - nav rails and nav bars) using the Compose Grid and FlexBox APIs. It also covers desktop experiences with keyboard shortcuts, tooltips and custom cursors./agp-9-upgradeUpgrades, or migrates, an Android project to use Android Gradle Plugin (AGP) version 9. Do not use this skill for migrating Kotlin Multiplatform (KMP) projects./android-cliProvides instructions for installing and using the `android` CLI. The `android` command-line tool is a critical tool for Android development and helps you create new Android projects, install APKs onto devices and emulators and launch and run apps on them, manage and interact with Android virtual devices (including screenshots and UI inspection), manage Android SDK components, inspect built artifacts (APK, AAB, JAR, AAR) for build and optimization details, render Compose previews, look up official Android documentation, and discover and install official Android skills.Other plugins' skills for the same job