android / snippets

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

Add M3 Carousel examples #328

Closed riggaroo closed 1 month ago

riggaroo commented 2 months ago

Material 1.3 introduces two experimental versions of the Material 3 Carousel - HorizontalMultiBrowseCarousel and HorizontalUncontainedCarousel.

The HorizontalMultiBrowseCarousel shows at least one large, medium, and small carousel item.

https://github.com/user-attachments/assets/b25bc4b3-f444-4647-9429-dd6d9d2935f6

The HorizontalUncontainedCarousel displays its items with the given size except for one item at the end that is cut off.

https://github.com/user-attachments/assets/db1398a9-a2a2-4a70-896d-573f2022ab83

Similar to using the HorizontalPager, the Carousel applies a few design specifications on top of the Pager.

snippet-bot[bot] commented 2 months ago

Here is the summary of possible violations 😱

There are 2 possible violations for removing region tag in use.

The end of the violation section. All the stuff below is FYI purposes only.


Here is the summary of changes.

You are about to add 2 region tags. - [compose/snippets/src/main/java/com/example/compose/snippets/components/Carousel.kt:42](https://github.com/android/snippets/blob/816ad66d8793ca7cc1e0156a3b1f0d85b4e26321/compose/snippets/src/main/java/com/example/compose/snippets/components/Carousel.kt#L42), tag `android_compose_carousel_multi_browse_basic` - [compose/snippets/src/main/java/com/example/compose/snippets/components/Carousel.kt:86](https://github.com/android/snippets/blob/816ad66d8793ca7cc1e0156a3b1f0d85b4e26321/compose/snippets/src/main/java/com/example/compose/snippets/components/Carousel.kt#L86), tag `android_compose_carousel_uncontained_basic`
You are about to delete 2 region tags. - [compose/snippets/src/androidTest/java/com/example/compose/snippets/deviceconfigurationoverride/DeviceConfigurationOverrideSnippets.kt:40](https://github.com/android/snippets/blob/eb6b518d0f00e4c34e1baea7c9ec092a39435386/compose/snippets/src/androidTest/java/com/example/compose/snippets/deviceconfigurationoverride/DeviceConfigurationOverrideSnippets.kt#L40), tag `android_compose_deviceconfigurationoverride_forcedsize` - [compose/snippets/src/androidTest/java/com/example/compose/snippets/deviceconfigurationoverride/DeviceConfigurationOverrideSnippets.kt:54](https://github.com/android/snippets/blob/eb6b518d0f00e4c34e1baea7c9ec092a39435386/compose/snippets/src/androidTest/java/com/example/compose/snippets/deviceconfigurationoverride/DeviceConfigurationOverrideSnippets.kt#L54), tag `android_compose_deviceconfigurationoverride_then`

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: