12 Commits

Author SHA1 Message Date
rightnao
74b5900aaa [Carousel] Make carousel internal classes public to enable custom strategies
PiperOrigin-RevId: 679710469
2024-10-01 18:41:44 +00:00
pekingme
46fa6465fe [Cleanup] Internal change
PiperOrigin-RevId: 608668937
2024-02-29 08:27:55 -08:00
Material Design Team
5471b8d37a Internal change
PiperOrigin-RevId: 607976596
2024-02-26 13:44:54 -08:00
rightnao
92a5444de9 [Carousel] Add attributes to change small item size
PiperOrigin-RevId: 580249803
2023-11-08 15:13:51 +00:00
rightnao
9a2347bda5 [Carousel] Force hero strategy to be start-aligned if there are not enough items to make it center-aligned
Resolves https://github.com/material-components/material-components-android/issues/3626

PiperOrigin-RevId: 572641635
2023-10-12 11:03:50 -07:00
rightnao
d5d604d0cc [Carousel] Disallowing center aligned hero strategy with only 2 items since it does not make any sense. With only 2 items there can only be a start state and end state with the hero strategy.
Resolves https://github.com/material-components/material-components-android/issues/3589

PiperOrigin-RevId: 568965460
2023-10-02 13:36:53 +00:00
hunterstich
c418063205 [Carousel] Fixed strategies crashing when there is not enough available space for a large and a small item
If the carousel container is not large enough to fit a small item and large item that is at least as large as the minimum small item size, mutli-browse and hero strategies will create an arrangment with a single, large item.

PiperOrigin-RevId: 568610428
2023-09-26 20:54:33 -04:00
rightnao
547156e497 [Carousel] Add carousel alignment attribute
PiperOrigin-RevId: 548719675
2023-07-18 16:50:16 +00:00
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
rightnao
6b48d3bb80 [Carousel] Add vertical scrolling capability
PiperOrigin-RevId: 542943240
2023-06-27 13:37:53 +00:00
rightnao
16c1575758 [Carousel] Carousel updates and fixes
- If item width is more than twice the item height, limit the width to twice the item height and add a medium item to the hero variant of the carousel.
- Fix snaphelper to snap to closest keyline state instead of always the default keyline state
- Add new KeylineStatePositionList to keep track of which keyline states to be in for each position. Update scrollToPosition methods to take the correct keyline instead of default keyline

PiperOrigin-RevId: 537955672
2023-06-06 15:56:43 +00:00
rightnao
340cd44b07 [Carousel] Add Hero carousel strategy
PiperOrigin-RevId: 531247503
2023-05-11 19:14:21 +00:00