reis-mobile 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +175 -168
- package/THIRD_PARTY_NOTICES.md +224 -4
- package/agents/android-architect.md +89 -0
- package/agents/android-performance-engineer.md +92 -0
- package/agents/android-test-engineer.md +97 -0
- package/agents/flutter-test-engineer.md +2 -0
- package/agents/ios-architect.md +93 -0
- package/agents/ios-performance-engineer.md +92 -0
- package/agents/ios-test-engineer.md +95 -0
- package/agents/lead-mobile.md +10 -1
- package/agents/mobile-staff-engineer.md +1 -1
- package/agents/rn-architect.md +94 -0
- package/agents/rn-performance-engineer.md +92 -0
- package/agents/rn-test-engineer.md +98 -0
- package/bin/reis-mobile.mjs +59 -17
- package/commands/debate.md +10 -1
- package/commands/debug.md +60 -0
- package/commands/reis-mobile.md +7 -2
- package/core/config/project.mjs +59 -0
- package/core/registry/frontmatter.mjs +15 -4
- package/core/registry/registry.mjs +21 -1
- package/core/router/intents.mjs +2 -0
- package/core/router/router.mjs +10 -5
- package/package.json +1 -1
- package/skills/android-adaptive/SKILL.md +304 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md +112 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md +69 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md +81 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md +415 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md +51 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/index.md +73 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md +170 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md +333 -0
- package/skills/android-adaptive/references/android/develop/ui/compose/tooling/debug.md +114 -0
- package/skills/android-adaptive/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-agp-9-upgrade/SKILL.md +106 -0
- package/skills/android-agp-9-upgrade/references/android/build/migrate-to-built-in-kotlin.md +416 -0
- package/skills/android-agp-9-upgrade/references/android/build/releases/agp-9-0-0-release-notes.md +554 -0
- package/skills/android-agp-9-upgrade/references/buildconfig.md +54 -0
- package/skills/android-agp-9-upgrade/references/ksp-kapt.md +39 -0
- package/skills/android-agp-9-upgrade/references/paparazzi-gradle-9.md +30 -0
- package/skills/android-agp-9-upgrade/references/recipes.md +62 -0
- package/skills/android-appfunctions/SKILL.md +74 -0
- package/skills/android-appfunctions/references/adb-interaction-testing.md +95 -0
- package/skills/android-appfunctions/references/context.md +26 -0
- package/skills/android-appfunctions/references/feature-discovery-analysis.md +71 -0
- package/skills/android-appfunctions/references/implementation-configuration.md +282 -0
- package/skills/android-appfunctions/references/kdoc-refinement-optimization.md +75 -0
- package/skills/android-appfunctions/references/migrate-to-service-entry-point.md +226 -0
- package/skills/android-camerax/SKILL.md +135 -0
- package/skills/android-camerax/references/camera1-to-camerax.md +198 -0
- package/skills/android-camerax/references/camera2-to-camerax.md +193 -0
- package/skills/android-camerax/references/expert-blueprints.md +58 -0
- package/skills/android-camerax/references/foldables.md +83 -0
- package/skills/android-camerax/references/immutability.md +60 -0
- package/skills/android-camerax/references/low-light.md +124 -0
- package/skills/android-camerax/references/mlkit-spatial.md +75 -0
- package/skills/android-camerax/references/modern-apis.md +42 -0
- package/skills/android-camerax/references/testing.md +69 -0
- package/skills/android-camerax/references/thermals.md +85 -0
- package/skills/android-camerax/references/wear-os.md +76 -0
- package/skills/android-camerax/references/xr.md +54 -0
- package/skills/android-cli/SKILL.md +474 -0
- package/skills/android-cli/references/interact.md +113 -0
- package/skills/android-cli/references/journeys.md +120 -0
- package/skills/android-code-review/SKILL.md +58 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/SKILL.md +340 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/design/ui/ai-glasses/guides/interaction/inputs.md +67 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/buttons.md +139 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/cards.md +148 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/focus.md +107 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/icons.md +90 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/text.md +69 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/jetpack-compose-glimmer/title-chips.md +82 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md +213 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-samples-source.md +176 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/button-source.md +203 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-samples-source.md +296 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/card-source.md +515 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffect-source.md +224 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/deptheffectlevels-source.md +105 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmersansflextypography-source.md +270 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/glimmertheme-source.md +182 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/icon-source.md +388 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconbutton-source.md +126 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/iconsizes-source.md +78 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/list-source.md +27 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/listitem-source.md +272 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/liststate-source.md +427 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/material-hct-source.md +217 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/projectedcontext-source.md +265 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stack-source.md +368 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackitemscope-source.md +440 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/stackstate-source.md +325 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/surface-source.md +1211 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-samples-source.md +101 -0
- package/skills/android-display-glasses-with-jetpack-compose-glimmer/references/titlechip-source.md +131 -0
- package/skills/android-edge-to-edge/SKILL.md +429 -0
- package/skills/android-engage-sdk-integration/SKILL.md +130 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/faq.md +439 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/food.md +1149 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/healthandfitness.md +1055 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/listen.md +1050 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/otherverticals.md +1301 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/read.md +910 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/shopping.md +1224 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/social.md +719 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/travel.md +1413 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/continue-watching/index.md +19 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/entitlements.md +353 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/getting-started.md +202 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/tv/recommendations.md +471 -0
- package/skills/android-engage-sdk-integration/references/android/guide/playcore/engage/watch.md +1081 -0
- package/skills/android-engage-sdk-integration/references/clusters.md +154 -0
- package/skills/android-engage-sdk-integration/references/common.md +519 -0
- package/skills/android-engage-sdk-integration/references/patterns.md +527 -0
- package/skills/android-engage-sdk-integration/references/requests.md +260 -0
- package/skills/android-engage-sdk-integration/references/schemas/food.md +509 -0
- package/skills/android-engage-sdk-integration/references/schemas/listen.md +842 -0
- package/skills/android-engage-sdk-integration/references/schemas/other.md +220 -0
- package/skills/android-engage-sdk-integration/references/schemas/read.md +412 -0
- package/skills/android-engage-sdk-integration/references/schemas/shopping.md +357 -0
- package/skills/android-engage-sdk-integration/references/schemas/social.md +228 -0
- package/skills/android-engage-sdk-integration/references/schemas/travel.md +923 -0
- package/skills/android-engage-sdk-integration/references/schemas/tv.md +1226 -0
- package/skills/android-engage-sdk-integration/references/schemas/watch.md +1137 -0
- package/skills/android-engage-sdk-integration/references/troubleshooting.md +39 -0
- package/skills/android-gradle-build-debug/SKILL.md +71 -0
- package/skills/android-intent-security/SKILL.md +550 -0
- package/skills/android-leanback-to-compose-tv-migration/SKILL.md +743 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/get-started/navigation.md +372 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/browse.md +243 -0
- package/skills/android-leanback-to-compose-tv-migration/references/android/training/tv/playback/compose/index.md +153 -0
- package/skills/android-media3-cast-integration/SKILL.md +236 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/create-castplayer.md +390 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/customize-castoptions.md +93 -0
- package/skills/android-media3-cast-integration/references/android/media/media3/cast/index.md +21 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/SKILL.md +127 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/analysis-of-the-project-and-layout.md +42 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/designsystems/migrate-xml-theme-to-compose.md +171 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/compose-in-views.md +299 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/migrate/interoperability-apis/views-in-compose.md +286 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/android/develop/ui/compose/setup-compose-dependencies-and-compiler.md +197 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/identify-optimal-xml-candidate.md +31 -0
- package/skills/android-migrate-xml-views-to-jetpack-compose/references/xml-layout-migration.md +86 -0
- package/skills/android-ml-kit-genai-prompt-api/SKILL.md +124 -0
- package/skills/android-ml-kit-genai-prompt-api/references/get-started.md +272 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prefix-caching.md +146 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-design.md +55 -0
- package/skills/android-ml-kit-genai-prompt-api/references/prompt-optimization.md +74 -0
- package/skills/android-ml-kit-genai-prompt-api/references/structured-output.md +219 -0
- package/skills/android-ml-kit-genai-prompt-api/references/system-instructions.md +71 -0
- package/skills/android-navigation-3/SKILL.md +122 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/index.md +51 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/migration-guide.md +670 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/animations.md +147 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basic.md +89 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicdsl.md +85 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/basicsaveable.md +90 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/bottomsheet.md +195 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/common-ui.md +200 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional-transitions.md +182 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/conditional.md +230 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-custommatcher.md +176 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-staticuri.md +140 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/deeplinks-syntheticbackstack.md +184 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/dialog.md +107 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/lifecycle-owner.md +185 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-listdetail.md +141 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/material-supportingpane.md +145 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-hilt.md +283 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/modular-koin.md +287 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/multiple-backstacks.md +468 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/passingarguments.md +371 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-event.md +273 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/results-state.md +266 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-listdetail.md +435 -0
- package/skills/android-navigation-3/references/android/guide/navigation/navigation-3/recipes/scenes-twopane.md +244 -0
- package/skills/android-navigation-3/references/android/guide/navigation/type-safe-destinations.md +129 -0
- package/skills/android-navigation-event/SKILL.md +312 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/dispatcher.md +134 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/handle-back.md +217 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/index.md +83 -0
- package/skills/android-navigation-event/references/android/guide/navigation/navigation-event/setup.md +32 -0
- package/skills/android-play-billing-library-version-upgrade/SKILL.md +96 -0
- package/skills/android-play-billing-library-version-upgrade/references/android/google/play/billing/release-notes.md +1240 -0
- package/skills/android-play-billing-library-version-upgrade/references/migration-logic.md +78 -0
- package/skills/android-play-billing-library-version-upgrade/references/version-checklist.md +54 -0
- package/skills/android-play-policy-insights/SKILL.md +172 -0
- package/skills/android-play-policy-insights/resources/common_mandates.md +100 -0
- package/skills/android-play-policy-insights/resources/compliance_report_template.md +59 -0
- package/skills/android-play-policy-insights/resources/critic.md +86 -0
- package/skills/android-play-policy-insights/resources/goal_data_safety.md +212 -0
- package/skills/android-play-policy-insights/resources/goal_permissions_and_apis.md +459 -0
- package/skills/android-play-policy-insights/resources/goal_user_account.md +106 -0
- package/skills/android-play-policy-insights/resources/policies.json +321 -0
- package/skills/android-play-policy-insights/resources/scanner_config.json +843 -0
- package/skills/android-play-policy-insights/scripts/generate_report.py +860 -0
- package/skills/android-play-policy-insights/scripts/orchestrator.py +1313 -0
- package/skills/android-play-policy-insights/scripts/play_store_scraper.py +410 -0
- package/skills/android-play-policy-insights/scripts/scanner.py +261 -0
- package/skills/android-play-policy-insights/scripts/template_engine.py +243 -0
- package/skills/android-profiler/SKILL.md +60 -0
- package/skills/android-profiler/analysis/analysis_orchestrator.md +32 -0
- package/skills/android-profiler/analysis/workflows/perfetto-sql/perfetto_sql.md +28 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/perfetto_trace_analysis.md +121 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/guiding_principles.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/domain_hints_template.md +7 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_cpu.md +56 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_graphics.md +51 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_io.md +46 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_ipc.md +41 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_memory.md +55 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/hints/subsystems/hints_power.md +33 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/per_candidate_analysis.md +172 -0
- package/skills/android-profiler/analysis/workflows/perfetto-trace-analysis/references/triage.md +94 -0
- package/skills/android-profiler/recording/recording_orchestrator.md +36 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/perfetto_trace_recording.md +148 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/app_jank.pftxt +43 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/cpu_profile.pftxt +35 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/java_heap_dump.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/long_background.pftxt +37 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/memory_counters.pftxt +45 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/native_heap.pftxt +21 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/example-configs/sched_cpu.pftxt +33 -0
- package/skills/android-profiler/recording/workflows/perfetto-trace-recording/references/trace_config_reference.md +102 -0
- package/skills/android-profiler/references/env_setup.md +15 -0
- package/skills/android-profiler/references/perfetto/setup.md +29 -0
- package/skills/android-profiler/references/perfetto/sql.md +327 -0
- package/skills/android-r8-analyzer/SKILL.md +72 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION-ANALYZER.md +287 -0
- package/skills/android-r8-analyzer/references/CONFIGURATION.md +44 -0
- package/skills/android-r8-analyzer/references/KEEP-RULES-IMPACT-HIERARCHY.md +83 -0
- package/skills/android-r8-analyzer/references/REDUNDANT-RULES.md +222 -0
- package/skills/android-r8-analyzer/references/REFLECTION-GUIDE.md +139 -0
- package/skills/android-r8-analyzer/references/REPORT_FORMAT.md +51 -0
- package/skills/android-r8-analyzer/references/android/topic/performance/app-optimization/enable-app-optimization.md +252 -0
- package/skills/android-r8-analyzer/references/android/training/testing/other-components/ui-automator.md +312 -0
- package/skills/android-restore-credentials/SKILL.md +359 -0
- package/skills/android-restore-credentials/references/android/guide/topics/manifest/application-element.md +832 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-restore-credentials/references/android/identity/passkeys/sign-in-with-passkeys.md +219 -0
- package/skills/android-styles/SKILL.md +229 -0
- package/skills/android-styles/references/android/develop/ui/compose/designsystems/custom.md +459 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/fundamentals.md +421 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/state-animations.md +461 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/styles-vs-modifiers.md +48 -0
- package/skills/android-styles/references/android/develop/ui/compose/styles/theming.md +269 -0
- package/skills/android-verified-email/SKILL.md +432 -0
- package/skills/android-verified-email/references/android/identity/credential-manager/index.md +67 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/credential-verifier.md +166 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification-implementation.md +313 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/email-verification.md +158 -0
- package/skills/android-verified-email/references/android/identity/digital-credentials/index.md +112 -0
- package/skills/android-verified-email/references/android/identity/passkeys/create-passkeys.md +327 -0
- package/skills/android-verified-email/references/android/identity/sign-in/credential-manager-webview.md +84 -0
- package/skills/android-wear-compose-m3/SKILL.md +365 -0
- package/skills/android-wear-compose-m3/references/android/training/wearables/compose/migrate-to-material3.md +677 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md +123 -0
- package/skills/android-wear-compose-m3/references/foundation/AmbientModeSample.kt.md.txt +123 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md +430 -0
- package/skills/android-wear-compose-m3/references/foundation/CurvedWorldSample.kt.md.txt +430 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md +99 -0
- package/skills/android-wear-compose-m3/references/foundation/ExpandableSample.kt.md.txt +99 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md +141 -0
- package/skills/android-wear-compose-m3/references/foundation/HierarchicalFocusSample.kt.md.txt +141 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md +56 -0
- package/skills/android-wear-compose-m3/references/foundation/PagerSamples.kt.md.txt +56 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md +153 -0
- package/skills/android-wear-compose-m3/references/foundation/RotarySamples.kt.md.txt +153 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/foundation/ScalingLazyColumnSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToDismissBoxSample.kt.md.txt +169 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md +282 -0
- package/skills/android-wear-compose-m3/references/foundation/SwipeToRevealSample.kt.md.txt +282 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md +335 -0
- package/skills/android-wear-compose-m3/references/foundation/TransformingLazyColumnSample.kt.md.txt +335 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md +377 -0
- package/skills/android-wear-compose-m3/references/material3/AlertDialogSample.kt.md.txt +377 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md +165 -0
- package/skills/android-wear-compose-m3/references/material3/AnimatedTextSample.kt.md.txt +165 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonGroupSample.kt.md.txt +91 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md +496 -0
- package/skills/android-wear-compose-m3/references/material3/ButtonSample.kt.md.txt +496 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md +470 -0
- package/skills/android-wear-compose-m3/references/material3/CardSample.kt.md.txt +470 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md +67 -0
- package/skills/android-wear-compose-m3/references/material3/CheckboxButtonSample.kt.md.txt +67 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md +162 -0
- package/skills/android-wear-compose-m3/references/material3/ConfirmationDialogSample.kt.md.txt +162 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md +78 -0
- package/skills/android-wear-compose-m3/references/material3/CurvedTextSamples.kt.md.txt +78 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md +131 -0
- package/skills/android-wear-compose-m3/references/material3/DatePickerSample.kt.md.txt +131 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md +74 -0
- package/skills/android-wear-compose-m3/references/material3/DynamicColorSchemeSample.kt.md.txt +74 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md +63 -0
- package/skills/android-wear-compose-m3/references/material3/EdgeButtonSample.kt.md.txt +63 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md +60 -0
- package/skills/android-wear-compose-m3/references/material3/FadingExpandingLabelSample.kt.md.txt +60 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconButtonSample.kt.md.txt +125 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md +116 -0
- package/skills/android-wear-compose-m3/references/material3/IconToggleButtonSample.kt.md.txt +116 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md +68 -0
- package/skills/android-wear-compose-m3/references/material3/LevelIndicatorSample.kt.md.txt +68 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md +50 -0
- package/skills/android-wear-compose-m3/references/material3/LinearProgressIndicatorSample.kt.md.txt +50 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md +177 -0
- package/skills/android-wear-compose-m3/references/material3/ListHeaderSample.kt.md.txt +177 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md +651 -0
- package/skills/android-wear-compose-m3/references/material3/OneHandedGestureSamples.kt.md.txt +651 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md +57 -0
- package/skills/android-wear-compose-m3/references/material3/OpenOnPhoneDialogSample.kt.md.txt +57 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md +110 -0
- package/skills/android-wear-compose-m3/references/material3/PageIndicatorSample.kt.md.txt +110 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md +204 -0
- package/skills/android-wear-compose-m3/references/material3/PagerScaffoldSample.kt.md.txt +204 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerGroupSample.kt.md.txt +139 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md +111 -0
- package/skills/android-wear-compose-m3/references/material3/PickerSample.kt.md.txt +111 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md +184 -0
- package/skills/android-wear-compose-m3/references/material3/PlaceholderSample.kt.md.txt +184 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md +263 -0
- package/skills/android-wear-compose-m3/references/material3/ProgressIndicatorSample.kt.md.txt +263 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md +105 -0
- package/skills/android-wear-compose-m3/references/material3/RadioButtonSample.kt.md.txt +105 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScaffoldSample.kt.md.txt +146 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollAwaySample.kt.md.txt +97 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/ScrollIndicatorSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md +86 -0
- package/skills/android-wear-compose-m3/references/material3/SliderSample.kt.md.txt +86 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md +148 -0
- package/skills/android-wear-compose-m3/references/material3/StepperSample.kt.md.txt +148 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md +166 -0
- package/skills/android-wear-compose-m3/references/material3/SurfaceTransformationSample.kt.md.txt +166 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToDismissBoxSample.kt.md.txt +172 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwipeToRevealSample.kt.md.txt +367 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md +66 -0
- package/skills/android-wear-compose-m3/references/material3/SwitchButtonSample.kt.md.txt +66 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextButtonSample.kt.md.txt +115 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md +71 -0
- package/skills/android-wear-compose-m3/references/material3/TextToggleButtonSample.kt.md.txt +71 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimePickerSample.kt.md.txt +151 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md +65 -0
- package/skills/android-wear-compose-m3/references/material3/TimeTextSample.kt.md.txt +65 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformationSpecSample.kt.md.txt +246 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnNotificationsSample.kt.md.txt +89 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md +309 -0
- package/skills/android-wear-compose-m3/references/material3/TransformingLazyColumnSample.kt.md.txt +309 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md +205 -0
- package/skills/android-wear-compose-m3/references/navigation3/SwipeDismissableSceneStrategySample.kt.md.txt +205 -0
- package/skills/{architecture-feature-first → flutter-architecture-feature-first}/SKILL.md +1 -1
- package/skills/{bloc → flutter-bloc}/SKILL.md +1 -1
- package/skills/flutter-build-debug/SKILL.md +66 -0
- package/skills/{code-review → flutter-code-review}/SKILL.md +1 -1
- package/skills/{dart-3-updates → flutter-dart-3-updates}/SKILL.md +1 -1
- package/skills/{dart-fix-runtime-errors → flutter-dart-fix-runtime-errors}/SKILL.md +1 -1
- package/skills/{dart-resolve-package-conflicts → flutter-dart-resolve-package-conflicts}/SKILL.md +1 -1
- package/skills/{dart-run-static-analysis → flutter-dart-run-static-analysis}/SKILL.md +1 -1
- package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/SKILL.md +1 -1
- package/skills/{effective-dart → flutter-effective-dart}/SKILL.md +1 -1
- package/skills/{provider → flutter-provider}/SKILL.md +1 -1
- package/skills/{riverpod → flutter-riverpod}/SKILL.md +1 -1
- package/skills/ios-cocoapods-debug/SKILL.md +65 -0
- package/skills/ios-code-review/SKILL.md +56 -0
- package/skills/ios-xcode-build-debug/SKILL.md +66 -0
- package/skills/{detect-mobile-stack → mobile-detect-stack}/SKILL.md +1 -1
- package/skills/mobile-firebase/SKILL.md +54 -0
- package/skills/mobile-firebase/references/android/ai-logic.md +31 -0
- package/skills/mobile-firebase/references/android/analytics.md +33 -0
- package/skills/mobile-firebase/references/android/app-check.md +36 -0
- package/skills/mobile-firebase/references/android/auth.md +44 -0
- package/skills/mobile-firebase/references/android/crashlytics.md +31 -0
- package/skills/mobile-firebase/references/android/firestore.md +44 -0
- package/skills/mobile-firebase/references/android/functions.md +33 -0
- package/skills/mobile-firebase/references/android/in-app-messaging.md +28 -0
- package/skills/mobile-firebase/references/android/messaging.md +41 -0
- package/skills/mobile-firebase/references/android/realtime-database.md +50 -0
- package/skills/mobile-firebase/references/android/remote-config.md +43 -0
- package/skills/mobile-firebase/references/android/sql-connect.md +31 -0
- package/skills/mobile-firebase/references/android/storage.md +39 -0
- package/skills/mobile-firebase/references/android.md +30 -0
- package/skills/{firebase-ai/SKILL.md → mobile-firebase/references/flutter/ai-logic.md} +2 -8
- package/skills/{firebase-analytics/SKILL.md → mobile-firebase/references/flutter/analytics.md} +2 -8
- package/skills/{firebase-app-check/SKILL.md → mobile-firebase/references/flutter/app-check.md} +2 -8
- package/skills/{firebase-auth/SKILL.md → mobile-firebase/references/flutter/auth.md} +2 -8
- package/skills/{firebase-crashlytics/SKILL.md → mobile-firebase/references/flutter/crashlytics.md} +2 -8
- package/skills/{firebase-cloud-firestore/SKILL.md → mobile-firebase/references/flutter/firestore.md} +2 -8
- package/skills/{firebase-cloud-functions/SKILL.md → mobile-firebase/references/flutter/functions.md} +2 -8
- package/skills/{firebase-in-app-messaging/SKILL.md → mobile-firebase/references/flutter/in-app-messaging.md} +2 -8
- package/skills/{firebase-messaging/SKILL.md → mobile-firebase/references/flutter/messaging.md} +2 -8
- package/skills/{firebase-database/SKILL.md → mobile-firebase/references/flutter/realtime-database.md} +2 -8
- package/skills/{firebase-remote-config/SKILL.md → mobile-firebase/references/flutter/remote-config.md} +2 -8
- package/skills/{flutterfire-configure/SKILL.md → mobile-firebase/references/flutter/setup-flutterfire.md} +1 -8
- package/skills/{firebase-data-connect/SKILL.md → mobile-firebase/references/flutter/sql-connect.md} +2 -8
- package/skills/{firebase-storage/SKILL.md → mobile-firebase/references/flutter/storage.md} +2 -8
- package/skills/mobile-firebase/references/flutter.md +36 -0
- package/skills/mobile-firebase/references/ios/ai-logic.md +30 -0
- package/skills/mobile-firebase/references/ios/analytics.md +33 -0
- package/skills/mobile-firebase/references/ios/app-check.md +36 -0
- package/skills/mobile-firebase/references/ios/auth.md +48 -0
- package/skills/mobile-firebase/references/ios/crashlytics.md +34 -0
- package/skills/mobile-firebase/references/ios/firestore.md +53 -0
- package/skills/mobile-firebase/references/ios/functions.md +35 -0
- package/skills/mobile-firebase/references/ios/in-app-messaging.md +26 -0
- package/skills/mobile-firebase/references/ios/messaging.md +45 -0
- package/skills/mobile-firebase/references/ios/realtime-database.md +49 -0
- package/skills/mobile-firebase/references/ios/remote-config.md +44 -0
- package/skills/mobile-firebase/references/ios/sql-connect.md +33 -0
- package/skills/mobile-firebase/references/ios/storage.md +36 -0
- package/skills/mobile-firebase/references/ios.md +28 -0
- package/skills/mobile-firebase/references/react-native/ai-logic.md +32 -0
- package/skills/mobile-firebase/references/react-native/analytics.md +43 -0
- package/skills/mobile-firebase/references/react-native/app-check.md +35 -0
- package/skills/mobile-firebase/references/react-native/auth.md +50 -0
- package/skills/mobile-firebase/references/react-native/crashlytics.md +36 -0
- package/skills/mobile-firebase/references/react-native/firestore.md +45 -0
- package/skills/mobile-firebase/references/react-native/functions.md +28 -0
- package/skills/mobile-firebase/references/react-native/in-app-messaging.md +27 -0
- package/skills/mobile-firebase/references/react-native/messaging.md +46 -0
- package/skills/mobile-firebase/references/react-native/realtime-database.md +46 -0
- package/skills/mobile-firebase/references/react-native/remote-config.md +32 -0
- package/skills/mobile-firebase/references/react-native/sql-connect.md +11 -0
- package/skills/mobile-firebase/references/react-native/storage.md +30 -0
- package/skills/mobile-firebase/references/react-native.md +29 -0
- package/skills/mobile-test/SKILL.md +63 -0
- package/skills/mobile-test/references/android/setup/GUIDE.md +183 -0
- package/skills/mobile-test/references/android/setup/references/android/develop/ui/compose/testing/common-patterns.md +181 -0
- package/skills/mobile-test/references/android/setup/references/android/studio/preview/compose-screenshot-testing.md +255 -0
- package/skills/mobile-test/references/android/setup/references/android/training/dependency-injection/hilt-testing.md +447 -0
- package/skills/mobile-test/references/android.md +83 -0
- package/skills/{dart-collect-coverage/SKILL.md → mobile-test/references/flutter/coverage.md} +2 -11
- package/skills/{dart-generate-test-mocks/SKILL.md → mobile-test/references/flutter/generate-mocks.md} +2 -11
- package/skills/{flutter-add-integration-test/SKILL.md → mobile-test/references/flutter/integration-tests.md} +2 -11
- package/skills/{dart-migrate-to-checks-package/SKILL.md → mobile-test/references/flutter/migrate-to-checks.md} +2 -13
- package/skills/{mockito/SKILL.md → mobile-test/references/flutter/mockito.md} +1 -8
- package/skills/{mocktail/SKILL.md → mobile-test/references/flutter/mocktail.md} +1 -8
- package/skills/{patrol-e2e-testing/SKILL.md → mobile-test/references/flutter/patrol.md} +1 -8
- package/skills/{testing/SKILL.md → mobile-test/references/flutter/testing-guidelines.md} +1 -8
- package/skills/{dart-add-unit-test/SKILL.md → mobile-test/references/flutter/unit-tests.md} +2 -11
- package/skills/{flutter-add-widget-test/SKILL.md → mobile-test/references/flutter/widget-tests.md} +2 -11
- package/skills/mobile-test/references/flutter.md +44 -0
- package/skills/mobile-test/references/ios.md +79 -0
- package/skills/mobile-test/references/react-native.md +62 -0
- /package/skills/{dart-use-pattern-matching → flutter-dart-use-pattern-matching}/examples/json_patterns.dart +0 -0
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
When creating a Glimmer Card component, refer to the following source code in
|
|
2
|
+
`Card.kt`:
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
```kotlin
|
|
6
|
+
/*
|
|
7
|
+
* Copyright 2025 The Android Open Source Project
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
package androidx.xr.glimmer
|
|
23
|
+
|
|
24
|
+
import androidx.compose.foundation.clickable
|
|
25
|
+
import androidx.compose.foundation.focusable
|
|
26
|
+
import androidx.compose.foundation.interaction.MutableInteractionSource
|
|
27
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
28
|
+
import androidx.compose.foundation.layout.Box
|
|
29
|
+
import androidx.compose.foundation.layout.Column
|
|
30
|
+
import androidx.compose.foundation.layout.PaddingValues
|
|
31
|
+
import androidx.compose.foundation.layout.Row
|
|
32
|
+
import androidx.compose.foundation.layout.defaultMinSize
|
|
33
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
34
|
+
import androidx.compose.foundation.layout.padding
|
|
35
|
+
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
36
|
+
import androidx.compose.runtime.Composable
|
|
37
|
+
import androidx.compose.runtime.CompositionLocalProvider
|
|
38
|
+
import androidx.compose.runtime.remember
|
|
39
|
+
import androidx.compose.ui.Alignment
|
|
40
|
+
import androidx.compose.ui.Alignment.Companion.CenterVertically
|
|
41
|
+
import androidx.compose.ui.Modifier
|
|
42
|
+
import androidx.compose.ui.draw.clip
|
|
43
|
+
import androidx.compose.ui.graphics.Color
|
|
44
|
+
import androidx.compose.ui.graphics.Shape
|
|
45
|
+
import androidx.compose.ui.layout.layout
|
|
46
|
+
import androidx.compose.ui.unit.Density
|
|
47
|
+
import androidx.compose.ui.unit.dp
|
|
48
|
+
import kotlin.math.roundToInt
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Card is a component used to group related information into a single digestible unit. A card can
|
|
52
|
+
* adapt to display a wide range of content, from simple text blurbs to more complex summaries with
|
|
53
|
+
* multiple elements. A card contains text [content], and may also have any combination of [title],
|
|
54
|
+
* [subtitle], [leadingIcon], and [trailingIcon]. If specified, [title] is placed on top of the
|
|
55
|
+
* [subtitle], which is placed on top of the [content]. A card fills the maximum width available by
|
|
56
|
+
* default.
|
|
57
|
+
*
|
|
58
|
+
* This Card is focusable - see the other [Card] overload for a clickable Card.
|
|
59
|
+
*
|
|
60
|
+
* Cards can also be combined with a [TitleChip]. See the documentation for [TitleChip] for more
|
|
61
|
+
* information / sample code.
|
|
62
|
+
*
|
|
63
|
+
* A simple Card with just text:
|
|
64
|
+
*
|
|
65
|
+
* @sample androidx.xr.glimmer.samples.CardSample
|
|
66
|
+
*
|
|
67
|
+
* A Card with a trailing icon:
|
|
68
|
+
*
|
|
69
|
+
* @sample androidx.xr.glimmer.samples.CardWithTrailingIconSample
|
|
70
|
+
*
|
|
71
|
+
* A Card with a title, subtitle, and a leading icon:
|
|
72
|
+
*
|
|
73
|
+
* @sample androidx.xr.glimmer.samples.CardWithTitleAndSubtitleAndLeadingIconSample
|
|
74
|
+
*
|
|
75
|
+
* A card with a title and a header image:
|
|
76
|
+
*
|
|
77
|
+
* @sample androidx.xr.glimmer.samples.CardWithTitleAndHeaderSample
|
|
78
|
+
* @param modifier the [Modifier] to be applied to this card
|
|
79
|
+
* @param title optional title to be placed above [subtitle] and [content], below [header]
|
|
80
|
+
* @param subtitle optional subtitle to be placed above [content], below [title]
|
|
81
|
+
* @param header optional header image to be placed at the top of the card. This image should
|
|
82
|
+
* typically fill the max width available, for example using
|
|
83
|
+
* [androidx.compose.ui.layout.ContentScale.FillWidth]. Headers are constrained to a maximum
|
|
84
|
+
* aspect ratio (1.6) to avoid taking up too much vertical space, so using a modifier such as
|
|
85
|
+
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
|
|
86
|
+
* aspect ratio.
|
|
87
|
+
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
|
|
88
|
+
* [Icon] tinted with [contentColor] by default.
|
|
89
|
+
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
|
|
90
|
+
* [Icon] tinted with [contentColor] by default.
|
|
91
|
+
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
|
|
92
|
+
* @param color background color of this card
|
|
93
|
+
* @param contentColor content color used by components inside [content], [title], [subtitle],
|
|
94
|
+
* [leadingIcon], and [trailingIcon].
|
|
95
|
+
* @param contentPadding the spacing values to apply internally between the container and the
|
|
96
|
+
* content. Note that there is additional padding applied around the content / text / icons inside
|
|
97
|
+
* a card, this only affects the outermost content padding.
|
|
98
|
+
* @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
|
|
99
|
+
* emitting Interactions for this card. You can use this to change the card's appearance or
|
|
100
|
+
* preview the card in different states. Note that if `null` is provided, interactions will still
|
|
101
|
+
* happen internally.
|
|
102
|
+
* @param content the main content / body text to display inside this card. This is recommended to
|
|
103
|
+
* be limited to 10 lines of text.
|
|
104
|
+
*/
|
|
105
|
+
@Composable
|
|
106
|
+
public fun Card(
|
|
107
|
+
modifier: Modifier = Modifier,
|
|
108
|
+
title: @Composable (() -> Unit)? = null,
|
|
109
|
+
subtitle: @Composable (() -> Unit)? = null,
|
|
110
|
+
header: @Composable (() -> Unit)? = null,
|
|
111
|
+
leadingIcon: @Composable (() -> Unit)? = null,
|
|
112
|
+
trailingIcon: @Composable (() -> Unit)? = null,
|
|
113
|
+
shape: Shape = CardDefaults.shape,
|
|
114
|
+
color: Color = GlimmerTheme.colors.surface,
|
|
115
|
+
contentColor: Color = calculateContentColor(color),
|
|
116
|
+
contentPadding: PaddingValues = CardDefaults.contentPadding,
|
|
117
|
+
interactionSource: MutableInteractionSource? = null,
|
|
118
|
+
content: @Composable () -> Unit,
|
|
119
|
+
) {
|
|
120
|
+
val internalInteractionSource = interactionSource ?: remember { MutableInteractionSource() }
|
|
121
|
+
CardImpl(
|
|
122
|
+
modifier =
|
|
123
|
+
modifier
|
|
124
|
+
.surface(
|
|
125
|
+
shape = shape,
|
|
126
|
+
color = color,
|
|
127
|
+
contentColor = contentColor,
|
|
128
|
+
interactionSource = internalInteractionSource,
|
|
129
|
+
)
|
|
130
|
+
.focusable(interactionSource = internalInteractionSource),
|
|
131
|
+
title = title,
|
|
132
|
+
subtitle = subtitle,
|
|
133
|
+
header = header,
|
|
134
|
+
leadingIcon = leadingIcon,
|
|
135
|
+
trailingIcon = trailingIcon,
|
|
136
|
+
action = null,
|
|
137
|
+
contentPadding = contentPadding,
|
|
138
|
+
content = content,
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Card is a component used to group related information into a single digestible unit. A card can
|
|
144
|
+
* adapt to display a wide range of content, from simple text blurbs to more complex summaries with
|
|
145
|
+
* multiple elements. A card contains text [content], and may also have any combination of [title],
|
|
146
|
+
* [subtitle], [leadingIcon], and [trailingIcon]. If specified, [title] is placed on top of the
|
|
147
|
+
* [subtitle], which is placed on top of the [content]. A card fills the maximum width available by
|
|
148
|
+
* default.
|
|
149
|
+
*
|
|
150
|
+
* This Card is focusable and clickable - see the other [Card] overload for a Card that is only
|
|
151
|
+
* focusable.
|
|
152
|
+
*
|
|
153
|
+
* Cards can also be combined with a [TitleChip]. See the documentation for [TitleChip] for more
|
|
154
|
+
* information / sample code.
|
|
155
|
+
*
|
|
156
|
+
* A simple clickable Card with just text:
|
|
157
|
+
*
|
|
158
|
+
* @sample androidx.xr.glimmer.samples.ClickableCardSample
|
|
159
|
+
*
|
|
160
|
+
* A clickable Card with a trailing icon:
|
|
161
|
+
*
|
|
162
|
+
* @sample androidx.xr.glimmer.samples.ClickableCardWithTrailingIconSample
|
|
163
|
+
*
|
|
164
|
+
* A clickable Card with a title, subtitle, and a leading icon:
|
|
165
|
+
*
|
|
166
|
+
* @sample androidx.xr.glimmer.samples.ClickableCardWithTitleAndSubtitleAndLeadingIconSample
|
|
167
|
+
*
|
|
168
|
+
* A clickable Card with a title and a header image:
|
|
169
|
+
*
|
|
170
|
+
* @sample androidx.xr.glimmer.samples.ClickableCardWithTitleAndHeaderSample
|
|
171
|
+
* @param onClick called when this card item is clicked
|
|
172
|
+
* @param modifier the [Modifier] to be applied to this card
|
|
173
|
+
* @param title optional title to be placed above [subtitle] and [content], below [header]
|
|
174
|
+
* @param subtitle optional subtitle to be placed above [content], below [title]
|
|
175
|
+
* @param header optional header image to be placed at the top of the card. This image should
|
|
176
|
+
* typically fill the max width available, for example using
|
|
177
|
+
* [androidx.compose.ui.layout.ContentScale.FillWidth]. Headers are constrained to a maximum
|
|
178
|
+
* aspect ratio (1.6) to avoid taking up too much vertical space, so using a modifier such as
|
|
179
|
+
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
|
|
180
|
+
* aspect ratio.
|
|
181
|
+
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
|
|
182
|
+
* [Icon] tinted with [contentColor] by default.
|
|
183
|
+
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
|
|
184
|
+
* [Icon] tinted with [contentColor] by default.
|
|
185
|
+
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
|
|
186
|
+
* @param color background color of this card
|
|
187
|
+
* @param contentColor content color used by components inside [content], [title], [subtitle],
|
|
188
|
+
* [leadingIcon], and [trailingIcon].
|
|
189
|
+
* @param contentPadding the spacing values to apply internally between the container and the
|
|
190
|
+
* content. Note that there is additional padding applied around the content / text / icons inside
|
|
191
|
+
* a card, this only affects the outermost content padding.
|
|
192
|
+
* @param interactionSource an optional hoisted [MutableInteractionSource] for observing and
|
|
193
|
+
* emitting Interactions for this card. You can use this to change the card's appearance or
|
|
194
|
+
* preview the card in different states. Note that if `null` is provided, interactions will still
|
|
195
|
+
* happen internally.
|
|
196
|
+
* @param content the main content / body text to display inside this card. This is recommended to
|
|
197
|
+
* be limited to 10 lines of text.
|
|
198
|
+
*/
|
|
199
|
+
@Composable
|
|
200
|
+
public fun Card(
|
|
201
|
+
onClick: () -> Unit,
|
|
202
|
+
modifier: Modifier = Modifier,
|
|
203
|
+
title: @Composable (() -> Unit)? = null,
|
|
204
|
+
subtitle: @Composable (() -> Unit)? = null,
|
|
205
|
+
header: @Composable (() -> Unit)? = null,
|
|
206
|
+
leadingIcon: @Composable (() -> Unit)? = null,
|
|
207
|
+
trailingIcon: @Composable (() -> Unit)? = null,
|
|
208
|
+
shape: Shape = CardDefaults.shape,
|
|
209
|
+
color: Color = GlimmerTheme.colors.surface,
|
|
210
|
+
contentColor: Color = calculateContentColor(color),
|
|
211
|
+
contentPadding: PaddingValues = CardDefaults.contentPadding,
|
|
212
|
+
interactionSource: MutableInteractionSource? = null,
|
|
213
|
+
content: @Composable () -> Unit,
|
|
214
|
+
) {
|
|
215
|
+
val internalInteractionSource = interactionSource ?: remember { MutableInteractionSource() }
|
|
216
|
+
CardImpl(
|
|
217
|
+
modifier =
|
|
218
|
+
modifier
|
|
219
|
+
.surface(
|
|
220
|
+
shape = shape,
|
|
221
|
+
color = color,
|
|
222
|
+
contentColor = contentColor,
|
|
223
|
+
interactionSource = internalInteractionSource,
|
|
224
|
+
)
|
|
225
|
+
.clickable(interactionSource = internalInteractionSource, onClick = onClick),
|
|
226
|
+
title = title,
|
|
227
|
+
subtitle = subtitle,
|
|
228
|
+
header = header,
|
|
229
|
+
leadingIcon = leadingIcon,
|
|
230
|
+
trailingIcon = trailingIcon,
|
|
231
|
+
action = null,
|
|
232
|
+
contentPadding = contentPadding,
|
|
233
|
+
content = content,
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* ActionCard is a version of a card that contains a primary [action] that is placed inside the card
|
|
239
|
+
* along the bottom edge of the card. The action should be a [Button], and represents the action
|
|
240
|
+
* that will be performed when this card is interacted with. The main card itself is not focusable -
|
|
241
|
+
* the [action] takes the focus instead.
|
|
242
|
+
*
|
|
243
|
+
* ActionCard is a component used to group related information into a single digestible unit. An
|
|
244
|
+
* action card can adapt to display a wide range of content, from simple text blurbs to more complex
|
|
245
|
+
* summaries with multiple elements. An action card contains text [content], and may also have any
|
|
246
|
+
* combination of [title], [subtitle], [leadingIcon], and [trailingIcon]. If specified, [title] is
|
|
247
|
+
* placed on top of the [subtitle], which is placed on top of the [content]. An action card fills
|
|
248
|
+
* the maximum width available by default.
|
|
249
|
+
*
|
|
250
|
+
* For more documentation and samples of the other cards, see [Card].
|
|
251
|
+
*
|
|
252
|
+
* @sample androidx.xr.glimmer.samples.ActionCardWithTitleSample
|
|
253
|
+
* @param action the action for this card. This should be a [Button], and represents the action
|
|
254
|
+
* performed when a user interacts with this card. The action is placed inside the card along the
|
|
255
|
+
* bottom, and fills up the width of the [ActionCard].
|
|
256
|
+
* @param modifier the [Modifier] to be applied to the outer layout containing the card and action
|
|
257
|
+
* @param title optional title to be placed above [subtitle] and [content], below [header]
|
|
258
|
+
* @param subtitle optional subtitle to be placed above [content], below [title]
|
|
259
|
+
* @param header optional header image to be placed at the top of the card. This image should
|
|
260
|
+
* typically fill the max width available, for example using
|
|
261
|
+
* [androidx.compose.ui.layout.ContentScale.FillWidth]. Headers are constrained to a maximum
|
|
262
|
+
* aspect ratio (1.6) to avoid taking up too much vertical space, so using a modifier such as
|
|
263
|
+
* [androidx.compose.foundation.layout.fillMaxSize] will result in an image that fills the maximum
|
|
264
|
+
* aspect ratio.
|
|
265
|
+
* @param leadingIcon optional leading icon to be placed before [content]. This is typically an
|
|
266
|
+
* [Icon] tinted with [contentColor] by default.
|
|
267
|
+
* @param trailingIcon optional trailing icon to be placed after [content]. This is typically an
|
|
268
|
+
* [Icon] tinted with [contentColor] by default.
|
|
269
|
+
* @param shape the [Shape] used to clip this card, and also used to draw the background and border
|
|
270
|
+
* @param color background color of this card
|
|
271
|
+
* @param contentColor content color used by components inside [content], [title], [subtitle],
|
|
272
|
+
* [leadingIcon], and [trailingIcon].
|
|
273
|
+
* @param contentPadding the spacing values to apply internally between the container and the
|
|
274
|
+
* content. Note that there is additional padding applied around the content / text / icons inside
|
|
275
|
+
* a card, this only affects the outermost content padding.
|
|
276
|
+
* @param content the main content / body text to display inside this card. This is recommended to
|
|
277
|
+
* be limited to 10 lines of text.
|
|
278
|
+
*/
|
|
279
|
+
@Composable
|
|
280
|
+
public fun ActionCard(
|
|
281
|
+
action: @Composable () -> Unit,
|
|
282
|
+
modifier: Modifier = Modifier,
|
|
283
|
+
title: @Composable (() -> Unit)? = null,
|
|
284
|
+
subtitle: @Composable (() -> Unit)? = null,
|
|
285
|
+
header: @Composable (() -> Unit)? = null,
|
|
286
|
+
leadingIcon: @Composable (() -> Unit)? = null,
|
|
287
|
+
trailingIcon: @Composable (() -> Unit)? = null,
|
|
288
|
+
shape: Shape = CardDefaults.shape,
|
|
289
|
+
color: Color = GlimmerTheme.colors.surface,
|
|
290
|
+
contentColor: Color = calculateContentColor(color),
|
|
291
|
+
contentPadding: PaddingValues = CardDefaults.contentPadding,
|
|
292
|
+
content: @Composable () -> Unit,
|
|
293
|
+
) {
|
|
294
|
+
CardImpl(
|
|
295
|
+
modifier = modifier.surface(shape = shape, color = color, contentColor = contentColor),
|
|
296
|
+
title = title,
|
|
297
|
+
subtitle = subtitle,
|
|
298
|
+
header = header,
|
|
299
|
+
leadingIcon = leadingIcon,
|
|
300
|
+
trailingIcon = trailingIcon,
|
|
301
|
+
action = action,
|
|
302
|
+
contentPadding = contentPadding,
|
|
303
|
+
content = content,
|
|
304
|
+
)
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
@Composable
|
|
308
|
+
private fun CardImpl(
|
|
309
|
+
modifier: Modifier,
|
|
310
|
+
title: @Composable (() -> Unit)?,
|
|
311
|
+
subtitle: @Composable (() -> Unit)?,
|
|
312
|
+
header: @Composable (() -> Unit)?,
|
|
313
|
+
leadingIcon: @Composable (() -> Unit)?,
|
|
314
|
+
trailingIcon: @Composable (() -> Unit)?,
|
|
315
|
+
action: @Composable (() -> Unit)?,
|
|
316
|
+
contentPadding: PaddingValues,
|
|
317
|
+
content: @Composable () -> Unit,
|
|
318
|
+
) {
|
|
319
|
+
val iconSize = GlimmerTheme.iconSizes.large
|
|
320
|
+
val typography = GlimmerTheme.typography
|
|
321
|
+
val componentSpacingValues = GlimmerTheme.componentSpacingValues
|
|
322
|
+
val innerPadding = componentSpacingValues.small
|
|
323
|
+
val iconSpacing = componentSpacingValues.medium
|
|
324
|
+
|
|
325
|
+
Column(
|
|
326
|
+
modifier = modifier.defaultMinSize(minHeight = MinimumHeight).padding(contentPadding),
|
|
327
|
+
verticalArrangement = CardVerticalArrangement,
|
|
328
|
+
horizontalAlignment = Alignment.CenterHorizontally,
|
|
329
|
+
) {
|
|
330
|
+
Column(
|
|
331
|
+
modifier = Modifier.fillMaxWidth(),
|
|
332
|
+
horizontalAlignment = Alignment.CenterHorizontally,
|
|
333
|
+
) {
|
|
334
|
+
header?.let {
|
|
335
|
+
Box(
|
|
336
|
+
Modifier.constrainHeightToAspectRatio(HeaderMaximumAspectRatio)
|
|
337
|
+
.clip(HeaderShape),
|
|
338
|
+
contentAlignment = Alignment.Center,
|
|
339
|
+
) {
|
|
340
|
+
it()
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
Row(
|
|
344
|
+
modifier = Modifier.fillMaxWidth().padding(innerPadding),
|
|
345
|
+
verticalAlignment = CenterVertically,
|
|
346
|
+
) {
|
|
347
|
+
if (leadingIcon != null) {
|
|
348
|
+
Box(
|
|
349
|
+
modifier = Modifier.align(Alignment.Top).padding(end = iconSpacing),
|
|
350
|
+
contentAlignment = Alignment.TopStart,
|
|
351
|
+
) {
|
|
352
|
+
CompositionLocalProvider(
|
|
353
|
+
LocalIconSize provides iconSize,
|
|
354
|
+
content = leadingIcon,
|
|
355
|
+
)
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
Column(
|
|
359
|
+
Modifier.weight(1f),
|
|
360
|
+
verticalArrangement = Arrangement.spacedBy(TextVerticalSpacing),
|
|
361
|
+
) {
|
|
362
|
+
if (title != null) {
|
|
363
|
+
CompositionLocalProvider(
|
|
364
|
+
LocalTextStyle provides typography.bodyMedium,
|
|
365
|
+
content = title,
|
|
366
|
+
)
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
if (subtitle != null) {
|
|
370
|
+
CompositionLocalProvider(
|
|
371
|
+
LocalTextStyle provides typography.caption,
|
|
372
|
+
content = subtitle,
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
CompositionLocalProvider(
|
|
377
|
+
LocalTextStyle provides typography.bodySmall,
|
|
378
|
+
content = content,
|
|
379
|
+
)
|
|
380
|
+
}
|
|
381
|
+
if (trailingIcon != null) {
|
|
382
|
+
Box(
|
|
383
|
+
modifier = Modifier.align(Alignment.Top).padding(start = iconSpacing),
|
|
384
|
+
contentAlignment = Alignment.TopEnd,
|
|
385
|
+
) {
|
|
386
|
+
CompositionLocalProvider(
|
|
387
|
+
LocalIconSize provides iconSize,
|
|
388
|
+
content = trailingIcon,
|
|
389
|
+
)
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
// b/436852852 - in a list the button won't be focused until it crosses the focus line.
|
|
395
|
+
action?.let {
|
|
396
|
+
Box(modifier = Modifier.fillMaxWidth(), propagateMinConstraints = true) { it() }
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* A custom [Arrangement.Vertical] used by [CardImpl] that pins the action to the bottom of the card
|
|
403
|
+
* and centers the body content in the remaining space above it.
|
|
404
|
+
*
|
|
405
|
+
* For regular cards (single child), it vertically centers the body within the card. For action
|
|
406
|
+
* cards (two children), it places the action at the bottom of the available space and centers the
|
|
407
|
+
* body in the remaining space above the action.
|
|
408
|
+
*/
|
|
409
|
+
private object CardVerticalArrangement : Arrangement.Vertical {
|
|
410
|
+
override fun Density.arrange(totalSize: Int, sizes: IntArray, outPositions: IntArray) {
|
|
411
|
+
if (sizes.isEmpty()) return
|
|
412
|
+
if (sizes.size == 1) {
|
|
413
|
+
with(Arrangement.Center) { arrange(totalSize, sizes, outPositions) }
|
|
414
|
+
return
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
val bodyHeight = sizes[0]
|
|
418
|
+
val actionHeight = sizes[1]
|
|
419
|
+
val availableBodyHeight = totalSize - actionHeight
|
|
420
|
+
|
|
421
|
+
// Sets outPositions[0] using Arrangment.Center on the available space
|
|
422
|
+
with(Arrangement.Center) {
|
|
423
|
+
arrange(availableBodyHeight, intArrayOf(bodyHeight), outPositions)
|
|
424
|
+
}
|
|
425
|
+
outPositions[1] = totalSize - actionHeight
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Constrains the content's height to a maximum aspect ratio, based on the maximum width.
|
|
431
|
+
*
|
|
432
|
+
* This modifier is similar to [androidx.compose.foundation.layout.aspectRatio], but it only
|
|
433
|
+
* enforces a maximum size, allowing the content to be smaller than the bounds defined by the aspect
|
|
434
|
+
* ratio. It also only constrains the height based on the width, it does not constrain the width
|
|
435
|
+
* based on the height.
|
|
436
|
+
*
|
|
437
|
+
* @param widthToHeightRatio the maximum aspect ratio allowed for the height. This is defined as the
|
|
438
|
+
* ratio of width / height
|
|
439
|
+
*/
|
|
440
|
+
private fun Modifier.constrainHeightToAspectRatio(widthToHeightRatio: Float): Modifier {
|
|
441
|
+
require(widthToHeightRatio > 0) { "Ratio must be positive" }
|
|
442
|
+
return this.layout { measurable, constraints ->
|
|
443
|
+
// We only want to constrain height, based on width. If width is unbounded and there is a
|
|
444
|
+
// bounded height, we don't want to constrain the width based on height. So do nothing if
|
|
445
|
+
// we don't have a constrained width
|
|
446
|
+
if (!constraints.hasBoundedWidth) {
|
|
447
|
+
val placeable = measurable.measure(constraints)
|
|
448
|
+
return@layout layout(placeable.width, placeable.height) {
|
|
449
|
+
placeable.placeRelative(0, 0)
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
val height =
|
|
454
|
+
(constraints.maxWidth / widthToHeightRatio)
|
|
455
|
+
.roundToInt()
|
|
456
|
+
// Handle the case where the width is more than ratio times larger than available
|
|
457
|
+
// height
|
|
458
|
+
.coerceAtMost(constraints.maxHeight)
|
|
459
|
+
|
|
460
|
+
val newConstraints =
|
|
461
|
+
constraints.copy(
|
|
462
|
+
// Relax minimum height to let the content be smaller than constraints.minHeight if
|
|
463
|
+
// the aspect ratio results in a height smaller than min height
|
|
464
|
+
minHeight = 0,
|
|
465
|
+
maxHeight = height,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
val placeable = measurable.measure(newConstraints)
|
|
469
|
+
|
|
470
|
+
// We relaxed the constraints earlier, but we still need to respect the incoming constraints
|
|
471
|
+
// ourselves.
|
|
472
|
+
val layoutHeight = placeable.height.coerceIn(constraints.minHeight, constraints.maxHeight)
|
|
473
|
+
|
|
474
|
+
layout(placeable.width, layoutHeight) {
|
|
475
|
+
// Center the content within the final layout height if needed
|
|
476
|
+
val y = (layoutHeight - placeable.height) / 2
|
|
477
|
+
placeable.placeRelative(0, y)
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** Default values used for [Card] */
|
|
483
|
+
public object CardDefaults {
|
|
484
|
+
/**
|
|
485
|
+
* Default content padding used for a [Card]
|
|
486
|
+
*
|
|
487
|
+
* This affects the outermost content padding applied around header images and the content
|
|
488
|
+
* container. Note that there is additional padding applied around the content / text / icons
|
|
489
|
+
* inside a card, this only represents the outer padding for the entire content.
|
|
490
|
+
*/
|
|
491
|
+
public val contentPadding: PaddingValues
|
|
492
|
+
@Composable get() = PaddingValues(GlimmerTheme.componentSpacingValues.medium)
|
|
493
|
+
|
|
494
|
+
/** The default shape of [Card], which determines its corner radius. */
|
|
495
|
+
public val shape: Shape
|
|
496
|
+
@Composable get() = GlimmerTheme.shapes.medium
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/** Default minimum height for a [Card] */
|
|
500
|
+
private val MinimumHeight = 80.dp
|
|
501
|
+
|
|
502
|
+
/** Spacing between title / subtitle / body text */
|
|
503
|
+
private val TextVerticalSpacing = 3.dp
|
|
504
|
+
|
|
505
|
+
/** Shape used to clip the header image */
|
|
506
|
+
private val HeaderShape = RoundedCornerShape(24.dp)
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Width / height aspect ratio for header images, to prevent the images from taking up too much
|
|
510
|
+
* vertical space
|
|
511
|
+
*/
|
|
512
|
+
private const val HeaderMaximumAspectRatio = 1.6f
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
<br />
|