Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
400 commits
Select commit Hold shift + click to select a range
8e42680
Honor iOS watermark text style
rosuH Jun 27, 2026
4b0f24f
Document iOS text style honoring
rosuH Jun 27, 2026
054636b
Document iOS icon markMode readiness
rosuH Jun 27, 2026
d8e71bb
Add iOS icon render path
rosuH Jun 27, 2026
e2f240d
Document iOS icon render path
rosuH Jun 27, 2026
676b741
Add iOS icon persistence
rosuH Jun 27, 2026
87da34f
Document iOS icon persistence
rosuH Jun 27, 2026
5c3afc8
Add iOS mark mode render branch
rosuH Jun 27, 2026
76f2308
Document iOS mark mode render branch
rosuH Jun 27, 2026
02beb95
Add iOS icon picker UI
rosuH Jun 27, 2026
4e56dcf
Document iOS icon picker UI
rosuH Jun 27, 2026
7583099
Add Desktop headless save flow
rosuH Jun 27, 2026
bf4e7a4
Document Desktop headless save flow
rosuH Jun 27, 2026
6c4ffdd
Add Desktop minimal window
rosuH Jun 27, 2026
411ccb7
Document Desktop minimal window
rosuH Jun 27, 2026
4e4d928
Add Desktop text color parity
rosuH Jun 27, 2026
bc0b53b
Document Desktop text color parity
rosuH Jun 27, 2026
2ec876d
Honor shared text draw style
rosuH Jun 27, 2026
299ff5f
Document shared text draw style honoring
rosuH Jun 27, 2026
822a448
Add Desktop image file picker
rosuH Jun 27, 2026
a0986b9
Add Desktop format-aware encoder
rosuH Jun 27, 2026
b354452
Wire Desktop output prefs into save flow
rosuH Jun 27, 2026
b2fae70
Add Desktop output preference presets
rosuH Jun 27, 2026
202f74f
Add Desktop icon composition primitive
rosuH Jun 27, 2026
3bc2b82
Add Desktop icon save flow branch
rosuH Jun 27, 2026
b58fd4b
Add Desktop icon picker control
rosuH Jun 27, 2026
eafc683
Add Desktop text mode toggle
rosuH Jun 27, 2026
0e4e2cc
Add Desktop current image memory
rosuH Jun 27, 2026
6d2dce9
Document Desktop product readiness map
rosuH Jun 27, 2026
c078b7f
Add Desktop save decision seam
rosuH Jun 27, 2026
7905fee
Add Desktop save-as destination
rosuH Jun 27, 2026
ed9e38e
Add Desktop template database builder
rosuH Jun 27, 2026
07ac7b6
Add Desktop templates headless witness
rosuH Jun 27, 2026
0333c76
Document Desktop templates persistence
rosuH Jun 27, 2026
e62cf2a
Add Desktop custom watermark text input
rosuH Jun 27, 2026
ef3a6ae
Add Desktop manual preview
rosuH Jun 27, 2026
05a6dba
Add Desktop degree control
rosuH Jun 27, 2026
f68a2de
Add Desktop text color control
rosuH Jun 27, 2026
52a765e
Add Desktop opacity control
rosuH Jun 27, 2026
209d2fb
Add Desktop gap controls
rosuH Jun 27, 2026
81f4a90
Add Desktop text size control
rosuH Jun 27, 2026
a869095
Add Desktop tile mode toggle
rosuH Jun 27, 2026
9d87d3f
Add Desktop text enum controls
rosuH Jun 27, 2026
5bc2c49
Make Desktop window scrollable
rosuH Jun 27, 2026
6c239b0
Add Desktop share substitute
rosuH Jun 27, 2026
18c84f8
Add Desktop drag-drop input
rosuH Jun 27, 2026
66f6e08
Add Desktop templates UI
rosuH Jun 27, 2026
4f2d335
Record Desktop templates UI closeout
rosuH Jun 27, 2026
bb5e770
Polish Desktop release hygiene
rosuH Jun 27, 2026
ccc9f3f
Add Desktop packaging proof
rosuH Jun 27, 2026
343b86d
Record Desktop packaging closeout
rosuH Jun 27, 2026
789c794
Add Desktop CI packaging workflow
rosuH Jun 27, 2026
264e552
Merge origin/master into feat/migrate_to_compose (S4d-169: resolve PR…
rosuH Jun 28, 2026
572f4c7
test: harden desktop CJK renderer golden
rosuH Jun 28, 2026
7f5ef49
ci: drop strict pinned golden from PR checks
rosuH Jun 28, 2026
055b574
docs: record PR checks unblock
rosuH Jun 28, 2026
ccda193
desktop: use app version for package
rosuH Jun 28, 2026
8d36d9f
build: single-source app version
rosuH Jun 28, 2026
fd380a9
shared: dedupe image format extensions
rosuH Jun 28, 2026
78d8425
shared: dedupe alpha percent display
rosuH Jun 28, 2026
7da3f8a
shared: centralize watermark font sizing
rosuH Jun 28, 2026
e91587b
android: use shared watermark font sizing
rosuH Jun 28, 2026
69023b0
android: reuse shared icon scale constant
rosuH Jun 28, 2026
08455b7
Single-source watermark default fallbacks
rosuH Jun 28, 2026
81d36f5
Document sizing and default single-sourcing
rosuH Jun 28, 2026
ee8ba5f
Delete dead renderer REF_WIDTH
rosuH Jun 28, 2026
07e6670
Document Android composition no-go
rosuH Jun 28, 2026
e281c57
Document MainViewModel IO no-go
rosuH Jun 28, 2026
f09c6e2
Add iOS renderer perceptual gate
rosuH Jun 28, 2026
1d4915f
Add iOS composition perceptual gate
rosuH Jun 28, 2026
9493eff
Consolidate Compose text style mappings
rosuH Jun 28, 2026
1f0019b
Add Desktop reactive preview refresh
rosuH Jun 28, 2026
56a39fa
Document Desktop reactive preview closeout
rosuH Jun 28, 2026
7fa34b9
Fix Desktop renderer stale KDoc
rosuH Jun 28, 2026
3c7b586
fix: align about cluster with production parity
rosuH Jun 28, 2026
84bdbaf
Document watermark density closeout
rosuH Jun 28, 2026
873dbcb
Route Desktop window state to user data dir
rosuH Jun 28, 2026
685a0bd
Document Desktop window persistence closeout
rosuH Jun 28, 2026
ce677bb
Route Desktop saves to user output dir
rosuH Jun 28, 2026
557dc35
Document Desktop user save output
rosuH Jun 28, 2026
97baa9d
Persist Desktop icons in app storage
rosuH Jun 28, 2026
7e0a05e
Record Desktop icon persistence docs
rosuH Jun 28, 2026
1fe8ab9
Test Desktop icon persistence helper
rosuH Jun 28, 2026
8678fe1
Record Desktop icon helper docs
rosuH Jun 28, 2026
0eaafdd
Avoid Desktop save overwrites
rosuH Jun 28, 2026
ebe5378
Record Desktop save collision docs
rosuH Jun 28, 2026
c7959d0
Seed Desktop template database
rosuH Jun 28, 2026
ba76272
Record Desktop template seed docs
rosuH Jun 28, 2026
875b105
Add Desktop locale-aware template seed
rosuH Jun 28, 2026
9ddcef5
Record Desktop locale-aware seed docs
rosuH Jun 28, 2026
6717d3c
Clean up Desktop locale seed docs
rosuH Jun 28, 2026
1fa945f
Add Desktop template update action
rosuH Jun 28, 2026
5ec8009
Document Desktop template update action
rosuH Jun 28, 2026
c833aea
Add Desktop multi-file drop batch save
rosuH Jun 29, 2026
a54e1b9
Document Desktop multi-file drop batch
rosuH Jun 29, 2026
4c895aa
Add Desktop Open image multi-select
rosuH Jun 29, 2026
b37a76f
Document Desktop Open image multi-select
rosuH Jun 29, 2026
278d585
Add iOS template Room builder
rosuH Jun 29, 2026
1a9463f
Document iOS template Room builder
rosuH Jun 29, 2026
44be9f7
Add iOS template seed packaging
rosuH Jun 29, 2026
fb4f78b
Document iOS template seed packaging
rosuH Jun 29, 2026
86e28f8
Add iOS template bridge UI
rosuH Jun 29, 2026
e54f7c4
Document iOS template bridge UI
rosuH Jun 30, 2026
03a826d
Record direct Codex migration goal
rosuH Jul 3, 2026
1e8bf9c
Add shared CMP UI foundations
rosuH Jul 3, 2026
325c183
Route Desktop through shared AppTheme
rosuH Jul 3, 2026
7021f0c
Move launch UI state to shared
rosuH Jul 3, 2026
d5815a8
Move utility screens to shared CMP
rosuH Jul 3, 2026
7e78d5c
Move editor controls to shared CMP
rosuH Jul 3, 2026
aa8553d
Test iOS template bridge UI
rosuH Jul 3, 2026
c5b9c94
Remove dead choose image action
rosuH Jul 3, 2026
8d2063c
Prove iOS template UI test
rosuH Jul 3, 2026
844c216
Record Android smoke MCP block
rosuH Jul 3, 2026
eaffede
Move launch shell to shared CMP
rosuH Jul 3, 2026
65f5463
Move editor top bar to shared CMP
rosuH Jul 3, 2026
3e3fe14
Move gallery grid to shared CMP
rosuH Jul 3, 2026
f3ec230
Move gallery top bar to shared CMP
rosuH Jul 3, 2026
3770fe5
Move gallery count FAB to shared CMP
rosuH Jul 3, 2026
47de99b
Move editor photo strip to shared CMP
rosuH Jul 3, 2026
2bf1066
Move editor preview frame to shared CMP
rosuH Jul 3, 2026
809ec33
Move editor screen shell to shared CMP
rosuH Jul 3, 2026
05dcf2c
Move icon option shell to shared CMP
rosuH Jul 3, 2026
75c25e7
Move save preview box to shared CMP
rosuH Jul 3, 2026
848e30e
Move save output options to shared CMP
rosuH Jul 3, 2026
b4a5b3a
Move save sheet shell to shared CMP
rosuH Jul 3, 2026
6ecf3af
Move editor bottom surface to shared CMP
rosuH Jul 3, 2026
4d5cb45
Move editor option carousel to shared CMP
rosuH Jul 3, 2026
2b3c53a
Move editor bottom tabs to shared CMP
rosuH Jul 3, 2026
0b2cd80
Move editor option control frame to shared CMP
rosuH Jul 3, 2026
475d6ac
Move gallery animation primitives to shared CMP
rosuH Jul 3, 2026
f51be86
Delete unused gallery animated dialog
rosuH Jul 3, 2026
0730395
Move gallery transition host to shared CMP
rosuH Jul 3, 2026
67412e0
Move gallery dialog shell to shared CMP
rosuH Jul 3, 2026
6d1c915
Move editor bottom controls host to shared CMP
rosuH Jul 3, 2026
e4e04e4
Move editor template sheet host to shared CMP
rosuH Jul 3, 2026
11b88c7
Move about screen shell to shared CMP
rosuH Jul 3, 2026
bbe0077
Use shared output options in desktop window
rosuH Jul 3, 2026
76bdf14
Use shared tile mode option in desktop window
rosuH Jul 3, 2026
8690892
Use shared typeface option in desktop window
rosuH Jul 3, 2026
8cf8ffe
Use shared icon option in desktop window
rosuH Jul 3, 2026
4b40cc7
Host shared Compose preview in ios app
rosuH Jul 3, 2026
52bd089
Use shared text style option in desktop window
rosuH Jul 3, 2026
980c040
Use shared opacity slider in desktop window
rosuH Jul 3, 2026
bbf4962
Use shared text size slider in desktop window
rosuH Jul 3, 2026
31d4c8d
Use shared degree slider in desktop window
rosuH Jul 3, 2026
e0b2031
Use shared text content option in desktop window
rosuH Jul 3, 2026
1e316d4
Use shared gap sliders in desktop window
rosuH Jul 3, 2026
94cfa89
Use shared text color option in desktop window
rosuH Jul 3, 2026
fca28a7
Use shared template sheet in desktop window
rosuH Jul 3, 2026
c05aa65
Use shared saved output actions in desktop window
rosuH Jul 3, 2026
59ea926
Use shared save command actions in desktop window
rosuH Jul 3, 2026
cfefc98
Use shared preview status in desktop window
rosuH Jul 3, 2026
13db21f
Use shared watermark mode actions in desktop window
rosuH Jul 3, 2026
accee77
Use shared editor option item shell
rosuH Jul 3, 2026
20cd969
Remove unused bottom surface shell
rosuH Jul 3, 2026
79fb142
Trim save export wrapper API
rosuH Jul 3, 2026
d6792c2
Remove dead save result state
rosuH Jul 3, 2026
bbfae58
Remove dead save process state
rosuH Jul 3, 2026
939542d
Remove dead aggregate save result
rosuH Jul 3, 2026
8ca4d85
Remove unused ConstraintLayout view dependency
rosuH Jul 3, 2026
0b0d6c6
Tighten non-null watermark flow usage
rosuH Jul 3, 2026
b96db18
Remove dead View stack dependencies
rosuH Jul 3, 2026
6b6bdcd
Disable unused app view binding
rosuH Jul 3, 2026
ee7ea33
Delete orphan toolbar menu resources
rosuH Jul 3, 2026
e6594bb
Remove dead ColorPickerView dependency
rosuH Jul 3, 2026
a1a01ba
Remove unused Activity KTX dependency
rosuH Jul 3, 2026
d7ee012
Remove unused app test dependencies
rosuH Jul 3, 2026
8809e0c
Remove stale Compose catalog aliases
rosuH Jul 3, 2026
c6bf504
Trim dead editor wrapper parameters
rosuH Jul 3, 2026
2788d53
Tighten editor wrapper visibility
rosuH Jul 3, 2026
c358268
Align gallery load callback naming
rosuH Jul 3, 2026
b240a65
Tighten launch and preview visibility
rosuH Jul 3, 2026
f5be492
Trim stale option dismiss callback
rosuH Jul 3, 2026
3e405ed
Drop stale editor material opt-ins
rosuH Jul 3, 2026
592eef5
Expand iOS shared editor host witness
rosuH Jul 3, 2026
5a1b3ef
Remove launch state default factory
rosuH Jul 3, 2026
46ef554
Tighten shared child component visibility
rosuH Jul 3, 2026
9fc401e
Hide shared transition internals
rosuH Jul 3, 2026
a28e80c
Add iOS launch shell host witness
rosuH Jul 3, 2026
1fbdd73
Add iOS gallery shell host witness
rosuH Jul 3, 2026
1595cf1
Add iOS about shell host witness
rosuH Jul 3, 2026
6a7bd17
Gate iOS shared witnesses behind test flag
rosuH Jul 3, 2026
09702a1
Remove stale iOS link witness text
rosuH Jul 3, 2026
c3fe7cf
Tighten iOS witness test coverage
rosuH Jul 3, 2026
8f54670
Use shared shell in Desktop window
rosuH Jul 11, 2026
42a1c21
Use shared preview in iOS app
rosuH Jul 11, 2026
8416caa
Frame iOS shared preview
rosuH Jul 11, 2026
ffb7f09
Use shared tile mode on iOS
rosuH Jul 11, 2026
b6b5ee7
Use shared text style control on iOS
rosuH Jul 11, 2026
5a62212
Use shared typeface control on iOS
rosuH Jul 11, 2026
80fa055
Use shared text size slider on iOS
rosuH Jul 11, 2026
7e0317d
Use shared rotation slider on iOS
rosuH Jul 11, 2026
c30e650
Use shared opacity slider on iOS
rosuH Jul 11, 2026
b13d41e
Use shared horizontal gap slider on iOS
rosuH Jul 11, 2026
66f7802
Use shared vertical gap slider on iOS
rosuH Jul 11, 2026
e307eb7
Use shared text color palette on iOS
rosuH Jul 11, 2026
c6f2f04
Document iOS CMP text input block
rosuH Jul 11, 2026
3d2e451
Use shared icon watermark option on iOS
rosuH Jul 11, 2026
616f872
Use shared launch screen on iOS
rosuH Jul 11, 2026
19b5ad0
Record AndroMeld control socket block
rosuH Jul 11, 2026
ce76ccd
Use shared preview frame on Desktop
rosuH Jul 11, 2026
7e59097
Record partial Android smoke evidence
rosuH Jul 11, 2026
fc94e93
Restore Android export state
rosuH Jul 11, 2026
ee564b3
Add commander migration goal
rosuH Jul 11, 2026
2c71282
Move iOS output actions to shared UI
rosuH Jul 11, 2026
117512e
Map shared screen platform edges
rosuH Jul 11, 2026
231f610
Map iOS templates sheet block
rosuH Jul 11, 2026
c6fb381
Record iOS About consumer block
rosuH Jul 11, 2026
803a729
Inline Android About screen edge
rosuH Jul 11, 2026
eda2276
Record Desktop root consumer block
rosuH Jul 11, 2026
7cc670a
Inline Android save export edge
rosuH Jul 11, 2026
25e1ad3
Close Android wrapper thinning
rosuH Jul 11, 2026
b9c1552
Fix wrapper closeout verification
rosuH Jul 11, 2026
8a82f26
Map iOS non-text control coverage
rosuH Jul 11, 2026
ef4028b
Record Compose iOS decision gate
rosuH Jul 11, 2026
d993882
Record Android mirror verification block
rosuH Jul 11, 2026
1748343
Translate Compose iOS decision pack
rosuH Jul 12, 2026
1e853a0
Record Android mirror recovery block
rosuH Jul 12, 2026
301a233
Refine migration closure evidence
rosuH Jul 12, 2026
315d9b1
Upgrade KMP and Compose toolchain
rosuH Jul 12, 2026
658e042
Replace file plans with Matt skill workflow
rosuH Jul 12, 2026
bf9a382
Use shared CMP text control on iOS
rosuH Jul 12, 2026
8323a8a
Use local migration ticket backend
rosuH Jul 12, 2026
6d1ff34
Fix migration spec whitespace
rosuH Jul 12, 2026
1c04976
Use shared EditorScreenShell as iOS production editor
rosuH Jul 12, 2026
a37c45c
Record A5b/A5c decision packs and complete A5d registry
rosuH Jul 12, 2026
572db41
Record owner sign-off for iOS gallery and About exceptions
rosuH Jul 12, 2026
bdc8512
Close Phase A with A5 PASS and unblock B0
rosuH Jul 12, 2026
5f60206
Add v2.10.0 parity inventory and capture scaffold
rosuH Jul 12, 2026
374690f
Archive en/dark prod vs debug parity captures with punch-list
rosuH Jul 12, 2026
80a5c2c
Track docs/parity screenshot archive under captures/
rosuH Jul 12, 2026
6650b67
Record Android gallery-first pick policy and unignore parity captures
rosuH Jul 12, 2026
7512da0
Add pass-2 parity captures after gallery policy
rosuH Jul 12, 2026
78ba5c3
Add HTML side-by-side parity comparison board
rosuH Jul 12, 2026
188c413
Fix Android editor chrome for Phase B parity
rosuH Jul 12, 2026
e3cff8b
Document editor P0 fix and refresh HTML comparison board
rosuH Jul 12, 2026
24097a4
Restore Text mode as edit sheet with template top-end
rosuH Jul 12, 2026
3328498
Tune export sheet for dimmed peek and continuous quality
rosuH Jul 12, 2026
72a1907
Center export list preview thumbnails horizontally
rosuH Jul 12, 2026
57713ef
Record owner approval for Android editor/export parity
rosuH Jul 12, 2026
07885bb
Record owner approval for launch and gallery parity
rosuH Jul 12, 2026
c704906
Complete B3 iOS/Desktop alignment exception registry
rosuH Jul 12, 2026
95e88be
Deliver §9 DoD audit and PR #358 graduation proposal
rosuH Jul 12, 2026
d50fcbc
Close ticket 10 residual automated §9 gates on lab host
rosuH Jul 12, 2026
5af5d1e
Record owner graduation decision A for PR #358
rosuH Jul 12, 2026
f3120c9
Fix Android color palette to match production swatches
rosuH Jul 12, 2026
2fa398c
Lock shared session plan: KMP ViewModel + CMP-first UI
rosuH Jul 12, 2026
b2e88c0
Land ADR-0017 Phase 0 shared ViewModel scaffold
rosuH Jul 12, 2026
8afaeef
Phase 1: shared session owns nav and gallery selection
rosuH Jul 12, 2026
40ec356
Add official Android agent skills for project-local use
rosuH Jul 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
301 changes: 301 additions & 0 deletions .claude/skills/adaptive/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
---
name: adaptive
description: Instructions 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. 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.
license: Complete terms in LICENSE.txt
metadata:
author: Google LLC
last-updated: '2026-07-02'
keywords:
- android
- ui
- adaptive
- Grid
- FlexBox
- MediaQuery
- navigation
---

## Prerequisites

The app must:

- Use Compose for all screens. If it's still using Fragments or Views, suggest using the XML to Compose skill to migrate those screens.
- Use Jetpack Navigation 3. If it doesn't, suggest the Navigation 3 skill to migrate the app.

## Workflow to make an app adaptive

To make an app adaptive, follow these steps or a subset of them adapting to the
task.

- Step 1: Verify current UI
- Step 2: Make the navigation bar adaptive
- Step 3: Add multi-pane layouts
- Step 4: Make vertical lists adaptive by changing the number of columns
- Step 5: Hide app bars when scrolling

## Step 1. Verify current UI

Ensure that screenshot tests exist to verify the current UI on different form
factors. If they don't exist, add the [Compose Preview Screenshot Testing
tool](references/android/develop/ui/compose/tooling/debug.md). Use the following annotation to create previews for all the major form
factors. For example:


```kotlin
@Preview(name = "Phone", device = Devices.PHONE, showBackground = true)
@Preview(name = "Foldable", device = Devices.FOLDABLE, showBackground = true)
@Preview(name = "Tablet", device = Devices.TABLET, showBackground = true)
@Preview(name = "Desktop", device = Devices.DESKTOP, showBackground = true)
annotation class FormFactorPreviews

@PreviewTest
@FormFactorPreviews
@Composable
fun FeedScreenPreview() {
SnippetsTheme {
Box {
Text("My Screen")
}
}
}
```

<br />

## Step 2. Make the navigation bar adaptive

Bottom navigation bars are optimized for touch input when the user is holding a
phone in portrait mode. On larger screen hand-held devices, like tablets and
unfolded foldables, the navigation area must be accessible from the edge of the
screen (navigation rail).

If you need to provide more screen space for the content, hide the
navigation area. Examples of this include:

- Hiding the navigation bar when the user scrolls down and showing it again when the user scrolls up. The assumption is that when the user is scrolling down, they are consuming content but when scrolling up they are trying to navigate away from that content.
- Hiding the navigation area when its content is distracting. For example, in camera previews or when displaying a full-screen photo.

When the detail screen is displayed full-screen on mobile, full-screen mode must
be deactivated on larger screens.

Steps to migrate:

- Locate the existing navigation bar.
- Convert each item to a `NavigationSuiteItem`.
- Identify whether the navigation bar's visibility changes. For example, if it is wrapped with an `AnimatedContent` or `AnimatedVisibility` composable. If so, follow the guidance in the "Control navigation area visibility".
- Replace the container that held the navigation bar (often a `Scaffold`) with `NavigationSuiteScaffold` from the Material 3 adaptive layouts library.
- Supply the navigation items using the `navigationItems` parameter of `NavigationSuiteScaffold`.

### Step 2.1. Control navigation area visibility

If the navigation bar's visibility changes - it is hidden under certain
scenarios or on certain screens - this behavior must be maintained with the
adaptive navigation area. This is done using `NavigationSuiteScaffold`'s `state`
parameter.

Steps to migrate:

- Identify the scenarios under which the navigation bar is hidden. This is usually done with a boolean variable for the visibility. Use `isNavBarVisible` or `shouldShowNavBar` as the variable name.
- Create an instance of `NavigationSuiteScaffoldState` using `rememberNavigationSuiteScaffoldState()` and pass it to `NavigationSuiteScaffold`.
- When the navigation area visibility changes, use a `LaunchedEffect` to call `show` or `hide` on the `NavigationSuiteScaffoldState`.

For example:


```kotlin
// Pass this variable to any composable that needs to control the navigation area visibility
var isNavBarVisible by remember { mutableStateOf(true) }
val scaffoldVisibilityState = rememberNavigationSuiteScaffoldState()

NavigationSuiteScaffold(
navigationSuiteItems = navItems,
state = scaffoldVisibilityState
) {
// Main content
}

LaunchedEffect(isNavBarVisible){
if (isNavBarVisible) {
scaffoldVisibilityState.show()
} else {
scaffoldVisibilityState.hide()
}
}
```

<br />

## Step 3. Add multi-pane layouts using Navigation 3 Scenes

Analyze the codebase looking for related screens - tapping on something in one
screen opens another screen that shows information related to the first. There
are two canonical screen relationships: list-detail and supporting pane.

IMPORTANT: You must use the Navigation 3 `SceneStrategy` approach to implement
multi-pane layouts. Do not use `ListDetailPaneScaffold` or
`SupportingPaneScaffold`.

### Step 3.1. List-detail

#### Identify the list and detail screens

List-detail layouts display a list of items (this is the list screen) and
clicking on an item opens a new screen that shows more details about that item
(the detail screen).

Typical usage includes productivity apps like email, notes, and messaging.

Unless requested explicitly, avoid this pattern when the detail content requires
substantial screen space (e.g., images or media that benefits from a full-screen
presentation).

#### Add a Material list-detail SceneStrategy

- Add the `androidx.compose.material3.adaptive:adaptive-navigation3` library
- Create an `androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy` using `rememberListDetailSceneStrategy`
- Pass the `ListDetailSceneStrategy` to `NavDisplay` using its `sceneStrategies` parameter

#### Use metadata to identify the list and detail screens

- Add metadata using `entry(metadata = ...)` or `NavEntry(metadata = ...)` to the list entry using `ListDetailSceneStrategy.listPane(detailPlaceholder = {
<placeholder composable> })`.
- Use the `detailPlaceholder` parameter to add a placeholder on the detail screen when no list items are selected.
- Add metadata to the detail entry using `ListDetailSceneStrategy.detailPane()`.

#### Important considerations

- When a detail screen displays its content full-screen on mobile (content fills the entire screen, bars or rails are hidden), full-screen mode must be deactivated if it's part of a list-detail layout.
- Detail screens must not show a back arrow when on a list-detail layout.

For a reference implementation, check the [Nav3 **Material** List Detail
recipe](references/android/guide/navigation/navigation-3/recipes/material-listdetail.md).

### Step 3.2. Supporting pane

Identify supporting pane screens where a main screen displays a single item, and
selecting it opens a "supporting screen" with more details. The supporting
screen complements the main screen and is shown in a supporting pane.

#### Add a Material supporting pane `SceneStrategy`

- If you haven't already, add the `androidx.compose.material3.adaptive:adaptive-navigation3` library
- Create an `androidx.compose.material3.adaptive.navigation3.SupportingPaneSceneStrategy` using `rememberSupportingPaneSceneStrategy`
- Pass the `SupportingPaneSceneStrategy` to `NavDisplay` using its `sceneStrategies` parameter

#### Use metadata to identify the main and supporting screens

- Add metadata using `entry(metadata = ...)` or `NavEntry(metadata = ...)` to the main entry using `SupportingPaneSceneStrategy.mainPane()`
- Add metadata to the supporting entry using `SupportingPaneSceneStrategy.supportingPane()`

### Step 3.3. Run screenshot tests

If you have made changes, record new reference files. Ask the user to visually
verify that the new layouts are correct.

## Step 4. Make vertical lists adaptive by changing the number of columns

### Step 4.1. Make lazy lists adaptive

Look for the following vertical list composables: `LazyColumn`,
`LazyVerticalGrid`, `LazyVerticalStaggeredGrid`.

Steps to migrate:

- Choose a suitable minimum width in dp for the column. The item must be clearly visible to the user at this width.
- For `LazyColumn`: change to a `LazyVerticalGrid` and follow the instruction later
- For `LazyVerticalGrid`: change the `columns` parameter to use `GridCells.Adaptive(<width>.dp)`
- For `LazyVerticalStaggeredGrid`: change the `columns` parameter to use `StaggeredGridCells.Adaptive(<width>.dp)`

### Step 4.2. Migrate non-lazy lists to Grid

WARNING: Grid is an experimental API available from Compose 1.11.0-beta01.
Confirm with the user that they are happy to use an experimental API in their
codebase.

Look for any `Column` that contains multiple items of the same type and replace
it with `Grid`. Do not replace it with `LazyVerticalGrid` or any other lazy
layout. Do not place `Grid` inside the existing `Column`. Completely replace it.

`Grid` is configured by supplying a lambda (an extension function on
`GridConfigurationScope`) to its `config` parameter. Inside the lambda,
`constraints` provides the minimum and maximum dimensions of the grid container
and can be used to change the number of rows and columns based on the available
size. For example, the following code configures `Grid` such that when the
available width is:

- less than 800dp, a 2x4 grid is used
- 800dp or more, a 4x2 grid is used


```kotlin
Grid(
config = {
val maxWidthDp = constraints.maxWidth.toDp()
val (cols, rows) = if (maxWidthDp < 800.dp){
2 to 4
} else{
4 to 2
}

val gapSizeDp = 8.dp
val cellSize = ((maxWidthDp - (gapSizeDp * (cols - 1))) / cols).coerceAtLeast(0.dp)
repeat(cols) { column(cellSize) }
repeat(rows) { row(cellSize) }
gap(gapSizeDp)
}
) { /** items **/ }
```

<br />

`Grid` is an experimental API so add the `@OptIn(ExperimentalGridApi::class)`
annotation to any function that uses it.

## Step 5: Hide App Bars when scrolling

In an app with multiple top-level destinations, each screen must manage its own
app bar state independently. There are two main scroll behaviors:

- `exitUntilCollapsedScrollBehavior`: Hides on scroll down, stays hidden while you scroll up until you reach the very top (0 offset).
- `enterAlwaysScrollBehavior`: Hides on scroll down, shows immediately on scroll up.

## Final step: Build and test

Build the app and run the local tests. If the project has screenshot tests, run
them but DO NOT update the reference images. Prompt the user to do this after
they have viewed the screenshot diffs.

## Additional documentation for experimental adaptive APIs

The following APIs are available from Compose 1.11.0-beta01.

### FlexBox

Check the FlexBox documentation:

- [Overview](references/android/develop/ui/compose/layouts/adaptive/flexbox/index.md)
- [Get started - setup](references/android/develop/ui/compose/layouts/adaptive/flexbox/get-started.md)
- [Set container behavior](references/android/develop/ui/compose/layouts/adaptive/flexbox/container-behavior.md)
- [Set item behavior](references/android/develop/ui/compose/layouts/adaptive/flexbox/item-behavior.md)

## MediaQuery

Check the [MediaQuery documentation](references/android/develop/ui/compose/layouts/adaptive/mediaquery/index.md) when you need to query the device's
screen size, pointer precision, keyboard type, whether it has cameras or
microphones, and other device capabilities.

## Grid

Check the Grid documentation when you need to display a fixed number of items in
a grid layout:

- [Overview](references/android/develop/ui/compose/layouts/adaptive/grid/index.md)
- [Get started - setup](references/android/develop/ui/compose/layouts/adaptive/grid/get-started.md)
- [Set container properties](references/android/develop/ui/compose/layouts/adaptive/grid/container-properties.md)
- [Set item properties](references/android/develop/ui/compose/layouts/adaptive/grid/item-properties.md)
Loading
Loading