android / snippets

Main repository for snippets surfaced on developer.android.com.
Apache License 2.0
561 stars 152 forks source link

Migrate to material3-adaptive WindowSizeClass method #264

Closed alexvanyo closed 3 months ago

alexvanyo commented 3 months ago

Updates the calculation of WindowSizeClass to use the new material3-adaptive method (which returns the androidx.window class) instead of the material3-window-size-class method.

Also adds a new snippet specifically for the calculation.

snippet-bot[bot] commented 3 months ago

Here is the summary of changes.

You are about to add 1 region tag. - [compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt:87](https://github.com/alexvanyo/snippets/blob/c2644270d336a2c6b1bf6576931d1221a1aefa47/compose/snippets/src/main/java/com/example/compose/snippets/layouts/AdaptiveLayoutSnippets.kt#L87), tag `android_compose_windowsizeclass`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below: