14 Commits

Author SHA1 Message Date
hunterstich
14023d2c85 [Carousel] Fixed MaskableFrameLayout not updating mask after size change when setting the mask using setMaskXPercentage.
This also fixes the default list catalog demo not displaying any items due to every item's mask having an empty maskRect.

Resolves https://github.com/material-components/material-components-android/pull/3450

PiperOrigin-RevId: 546859519
2023-07-11 19:38:42 +00:00
rightnao
29d8742917 [Carousel] Deprecate set/get mask x percentages in Maskable as they are no longer used anywhere, and is a misleading method due to these methods not actually having any effect on the Carousel as CarouselLayoutManager overrides the values.
PiperOrigin-RevId: 542347361
2023-06-26 21:40:18 +00:00
hunterstich
85b6d5018d [Carousel] Fixed multi browse strategy clipping extra small items before being fully collapsed
This moves mask rect calculation from MaskableFrameLayout into CarouselLayoutManager so CarouselLayoutManager can change the offsetting of the mask inside a child and clip according to both the keylines and the carousel container boundary.

PiperOrigin-RevId: 533082558
2023-05-22 18:34:32 +00:00
hunterstich
c031144d26 [NavigationView] Updated NavigationView to use ViewOutlineProvider to handle corner clipping when possible and remove drawerLayoutCornerClippingEnabled attribute.
PiperOrigin-RevId: 527633449
2023-04-27 16:38:17 -04:00
pubiqq
7bc26e5070 [Carousel] Fix item masking for API 21
Resolves https://github.com/material-components/material-components-android/pull/3330

GIT_ORIGIN_REV_ID=1c46e2882b074e35ab1f19af0af00f88dee84f4c
PiperOrigin-RevId: 523119333
2023-04-11 19:55:10 -07:00
hunterstich
93ceb7edee [Carousel] Add support for transitions by forcing canvas clipping when detaching from the window.
PiperOrigin-RevId: 517963541
2023-03-20 21:24:55 +00:00
hunterstich
43c507775f [Carousel] Updated MaskableFrameLayout to use Outline path clipping on 33+ only.
PiperOrigin-RevId: 517128236
2023-03-16 15:26:15 +00:00
hunterstich
3856af1b65 [Carousel] Updated setForceCompatClipping visibility for testing.
PiperOrigin-RevId: 516584087
2023-03-14 22:09:22 +00:00
hunterstich
733c9e08c2 [Carousel] Updated MaskableFrameLayout to clip more performantly.
Clipping is now handled differently depending on the shape being used and API level.
* 30+ always uses a ViewOutlineProvider
* 21+ uses a ViewOutlineProvider when the shape is a round rect
* All other API levels and cases fall back to canvas clipping

PiperOrigin-RevId: 516297199
2023-03-13 21:21:48 +00:00
hunterstich
359580b6c1 [Carousel] Changed Maskable.add/removeOnMaskChangedListener to Maskable.setOnMaskChangedListener.
This change is to prevent the case of items in a RecyclerView.Adapter being recycled and re-bound and having more and more listeners added to a MaskableFrameLayout.

PiperOrigin-RevId: 515048125
2023-03-08 21:30:15 +00:00
hunterstich
bdf73bf54a [Carousel] Minor javadoc working fixes
PiperOrigin-RevId: 509185650
2023-02-13 13:28:29 +00:00
hunterstich
4b1a890e60 [Carousel] Renamed Maskable.getMaskRect to Maskable.getMaskRectF
PiperOrigin-RevId: 508626230
2023-02-10 14:25:59 +00:00
hunterstich
67b251af32 [Carousel] Improve documentation and throw when CarouselLayoutManager children are not Maskable.
PiperOrigin-RevId: 508160107
2023-02-09 13:51:34 +00:00
hunterstich
4ecba81de6 [Carousel] Release carousel component
PiperOrigin-RevId: 501635363
2023-01-12 12:25:52 -08:00