76 Commits

Author SHA1 Message Date
Ga\u00ebtan Muller
65e5f1aba1 [Internal] Remove the internal ViewOverlay compat layer
Resolves https://github.com/material-components/material-components-android/pull/4736

GIT_ORIGIN_REV_ID=9eced1439e9503f5cc88cc3f2834f55e5466448c
PiperOrigin-RevId: 756779136
2025-05-12 18:15:01 +00:00
pubiqq
bc2fdeadaf [Internal] Prefer platform methods to compat ones
Resolves https://github.com/material-components/material-components-android/pull/4532

GIT_ORIGIN_REV_ID=180dec736f2521579e483317a4d537629d8f247b
PiperOrigin-RevId: 715494344
2025-01-15 18:06:07 +00:00
pubiqq
23aca03255 [Internal] Remove pre-Lollipop checks
Resolves https://github.com/material-components/material-components-android/pull/4266

GIT_ORIGIN_REV_ID=1de7808e66dd6666c893217c76c7499afe2df6a3
PiperOrigin-RevId: 669688797
2024-09-03 13:31:29 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
dsn5ft
0429d448a0 [Transition] Update MaterialContainerTransform to use getLocationInWindow() instead of getLocationOnScreen() when calculating bounds
Fixes issue where start / end view jump during transition in landscape mode when there is an artificial inset due to the camera hole / other display cutouts

PiperOrigin-RevId: 631421213
2024-05-07 18:47:15 +00:00
dsn5ft
22de817c30 [Docs] Internal change
PiperOrigin-RevId: 613673995
2024-03-07 20:52:14 +00:00
Material Design Team
5471b8d37a Internal change
PiperOrigin-RevId: 607976596
2024-02-26 13:44:54 -08:00
afohrman
8ccec334bd [Predictive Transitions] Added predictive transition support for fragments and views to the Material motion library, and enabled it in shared axis fragment transition demo.
This allows all MaterialVisibility transitions to be predictive, although each individual transition must be opted-in in order to be predictive/seekable.

Resolves https://github.com/material-components/material-components-android/issues/3619

PiperOrigin-RevId: 587108521
2023-12-04 15:44:19 +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
pubiqq
158d9f012a [ShapeAppearance] Change relative corner size behavior for "vertical" shapes
Resolves https://github.com/material-components/material-components-android/pull/2929

GIT_ORIGIN_REV_ID=38438252c1d43d1ccbeb333bdfc7a76b469033f4
PiperOrigin-RevId: 471564817
2022-09-01 10:25:55 -07:00
hunterstich
5b50bf13a2 [Transitions] Fix container transform easing mapping.
PiperOrigin-RevId: 444901780
2022-04-27 13:32:37 -04:00
hunterstich
e151b7a8ae [Transitions] Update shared axis, fade through, and fade to use new easing and duration system.
PiperOrigin-RevId: 444897183
2022-04-27 13:31:00 -04:00
hunterstich
f2f454ba8a [Motion] Update container transform to use new motion system.
PiperOrigin-RevId: 444848054
2022-04-27 10:12:54 -04:00
hunterstich
0ab2068bac [Motion] Add new motion system duration theming
PiperOrigin-RevId: 436975443
2022-03-28 15:57:30 +00:00
hunterstich
0d91f4ac3b [Motion] Add motion easing xml interpolators and theme attributes.
PiperOrigin-RevId: 435639751
2022-03-18 18:52:15 +00:00
Material Design Team
cfc00aa5a3 Update android core class definitions across material
PiperOrigin-RevId: 414839941
2021-12-08 14:56:25 +00:00
Material Design Team
a487c89185 Internal change
PiperOrigin-RevId: 412135443
2021-11-29 17:35:39 +00:00
conradchen
b51692da7d [Transition] Fix NPE when removing window background
Null background is a totally valid state. Handles the nullness to prevent NPE from happening.

Resolves https://github.com/material-components/material-components-android/issues/2309

PiperOrigin-RevId: 386081632
2021-07-22 11:55:11 -04:00
hunterstich
217bdef9f0 [Motion] Add motion package and utils to resolve motion theme attrs.
PiperOrigin-RevId: 366065469
2021-04-01 10:51:35 -04:00
hunterstich
5d65278c82 [Motion] Updated FadeThroughProvider to allow customization of the fade through threshold.
PiperOrigin-RevId: 362065364
2021-03-15 15:12:41 -04:00
hunterstich
edd2eb57e5 [Motion] Updated motion theming attr names.
PiperOrigin-RevId: 356983952
2021-02-17 06:47:56 -08:00
afohrman
655caeddba [Motion] Added theming to MaterialFadeThrough transition.
PiperOrigin-RevId: 351843861
2021-01-15 17:01:51 -05:00
afohrman
478b4124d2 [Motion] Added theming to MaterialSharedAxis transition.
PiperOrigin-RevId: 351841194
2021-01-15 16:59:34 -05:00
afohrman
15a2307e91 [Motion] Refactored applyThemeValues() and related methods.
PiperOrigin-RevId: 351220994
2021-01-11 21:19:11 -05:00
afohrman
8e79c7ea1c [Motion] Added theming to MaterialFade transition.
PiperOrigin-RevId: 351180119
2021-01-11 21:15:56 -05:00
dniz
7e578e4b13 [Motion] Changed motionPath theme attr format to enum|string
PiperOrigin-RevId: 344865393
2020-12-01 09:28:06 -05:00
dniz
5154eeae32 [Motion] Applied easing, duration, and path theme attributes to MaterialContainerTransform
Also removed custom dagger container transform config from Catalog so that these motion theme changes are observable

PiperOrigin-RevId: 344118337
2020-11-25 10:25:26 -05:00
dniz
186d5ed023 [Motion] Added easing, duration, and path theme attributes, as well as utilities to read them
PiperOrigin-RevId: 343380483
2020-11-20 15:00:13 -05:00
dniz
ad1d173018 [Motion] Updated MaterialContainerTransform to support overshoot and added OvershootInterpolator, AnticipateOvershootInterpolator, and BounceInterpolator options to Catalog demos
Allows overshoot for the translation and width/height scale parts of the container transform's animation, not the fade part of the animation.

Resolves https://github.com/material-components/material-components-android/issues/1838

PiperOrigin-RevId: 341432972
2020-11-09 13:34:50 -05:00
hunterstich
d4d0dcdbc6 [Motion] Update ScaleProvider and SlideDistanceProvider to respect and restore a targets original scale/translation.
PiperOrigin-RevId: 339309231
2020-10-28 09:46:39 -04:00
hunterstich
5d0e0322b1 [Motion] Updated FadeProvider and FadeThroughProvider to support Activity alpha.
PiperOrigin-RevId: 338448088
2020-10-22 17:40:15 -04:00
hunterstich
49ad52288c [Motion] Updated FadeThroughProvider and FadeProvider to restore target's original alpha value.
Resloves https://github.com/material-components/material-components-android/issues/1701

PiperOrigin-RevId: 337374791
2020-10-16 05:53:46 -07:00
hunterstich
1fc5e8c51c [Slider] Added animation to scale in/out label above thumbs.
PiperOrigin-RevId: 336635571
2020-10-15 13:13:28 -07:00
hunterstich
06322aadb9 [Motion] Updated MaterialFadeThrough to respect client-set alpha values on target views.
Resolves https://github.com/material-components/material-components-android/issues/1701

PiperOrigin-RevId: 330932760
2020-09-10 11:15:14 -04:00
hunterstich
05e0496cf9 [Motion] Removed internal listener from container transform after transition ends.
Resolves https://github.com/material-components/material-components-android/issues/1601

PiperOrigin-RevId: 325798894
2020-08-10 13:21:50 -04:00
marianomartin
c59c04639c [MaterialShapeDrawable] Convert ShapeAppearancePathProvider to a singleton.
Also allocate less path objects.

PiperOrigin-RevId: 325287653
2020-08-06 21:10:36 -04:00
dniz
23d610007d [Motion] Improved MaterialContainerTransform approximation of native elevation shadows by using location of bounds on screen
Resolves https://github.com/material-components/material-components-android/issues/1543
Follow-up to https://github.com/material-components/material-components-android/issues/1126

PiperOrigin-RevId: 324807509
2020-08-04 10:47:27 -04:00
dniz
88ca5c9eeb [Motion] Removed extra transition background fade duration from MaterialContainerTransformSharedElementCallback in favor of nulling out sharedElementReenterTransition to prevent extra transition from happening
Related to https://github.com/material-components/material-components-android/issues/1433
Related to https://github.com/material-components/material-components-android/issues/1344

PiperOrigin-RevId: 322614608
2020-07-22 14:25:30 -04:00
dniz
889fca55a2 [Motion] Added extra transition background fade duration to MaterialContainerTransformSharedElementCallback to prevent extra Activity transition from happening
Resolves https://github.com/material-components/material-components-android/issues/1433
Mentioned in https://github.com/material-components/material-components-android/issues/1344

PiperOrigin-RevId: 321550602
2020-07-16 07:27:36 -07:00
marianomartin
049ad022a6 Delete components build.gradle files
PiperOrigin-RevId: 320944144
2020-07-15 09:38:31 -07:00
dniz
6b63c117fd [Motion] Changed MaterialContainerTransform to skip transition instead of crash when no view bounds
Resolves https://github.com/material-components/material-components-android/issues/1377

PiperOrigin-RevId: 319977600
2020-07-07 11:00:27 -04:00
hunterstich
3c9096d451 [Motion] Fix zero-length motion path container transform bug.
getPosTan, which calculates the translation of the conatienr bounds, no-ops if the startView doesn't move to a new position (when the startView and endView are top aligned and centered horizontally on one another). This was causing motionPathPositions, the int array holding the x and y of the animated bounds to never be initialized, defaulting to 0, and throwing off the bounds calculation.
This CL updates the int array with actual default x and y values so when getPosTan no-ops, the motionPathPosition array contains the correct values.

Resolves https://github.com/material-components/material-components-android/issues/1161

PiperOrigin-RevId: 319247326
2020-07-06 11:08:36 -04:00
marianomartin
555356b03f Internal cleanup
PiperOrigin-RevId: 318134343
2020-06-26 14:06:52 -04:00
dniz
ef64df5adc [Motion] Updated MaterialElevationScale default scale value to 0.85
PiperOrigin-RevId: 316905583
2020-06-17 20:40:56 -07:00
dniz
3379c45980 [Motion] Added MaterialElevationScale transition
Useful as an exit transition and reenter transition in conjunction with MaterialContainerTransform

PiperOrigin-RevId: 316708216
2020-06-17 18:32:57 -07:00
hunterstich
56b33909ee [Motion] Update ScaleProvider to use growing/shrinking naming. Fix MaterialSharedAxis isForward getter naming.
PiperOrigin-RevId: 313217150
2020-05-26 16:02:20 -04:00
dniz
1a6ebc0c56 [Motion] Remove boolean entering from MaterialFade constructor and don't set default duration
This makes MaterialFade more consistent with the other transition patterns

PiperOrigin-RevId: 312718402
2020-05-21 16:58:07 -04:00
dniz
ae6fcf14e7 [Motion] Add more explanation to the MaterialContainerTransform method Javadocs
PiperOrigin-RevId: 312672592
2020-05-21 16:52:11 -04:00
dniz
f20a91f980 [Motion] Update MaterialContainerTransform to use default scrim color constant instead of theme attribute
PiperOrigin-RevId: 312492669
2020-05-20 17:09:02 -04:00
dniz
ed41b2756f [Motion] Improve MaterialContainerTransform exception if start or end view bounds are null
PiperOrigin-RevId: 312273459
2020-05-19 18:31:04 -04:00