29 Commits

Author SHA1 Message Date
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
hunterstich
e00df6d075 [Motion] Add support for container transform start and end container colors.
PiperOrigin-RevId: 312152199
2020-05-19 10:23:24 -04:00
dniz
a5381acf02 [Motion] Update MaterialContainerTransformSharedElementCallback to support custom shape appearances
PiperOrigin-RevId: 311150643
2020-05-12 19:31:12 -04:00
dniz
1094b48080 [Motion] Update MaterialContainerTransform to support drawing elevation shadows during transition
By default, the elevation shadows are only enabled for API level 28 and above, because Paint shadows are not supported with hardware acceleration below API level 28. If enabled for below API level 28, then the shadows will be drawn using MaterialShapeDrawable, however this may cause performance issues.

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

PiperOrigin-RevId: 310602814
2020-05-08 15:30:17 -04:00
hunterstich
6ab9e11a0e [Motion] Fix container transform start delay flash
Switch the container transform to use a transition listener instead of an animator listener. A transition listener calls onTransitionStart as soon as the transition begins where an animator listener calls onAnimatorStart after the transitions delay, if any, casuing an unwanted visual flash of the end view before the animator starts.

PiperOrigin-RevId: 309977033
2020-05-07 11:26:11 -04:00
dniz
b854a73772 [Motion] Add support for adding additional animator providers to MaterialVisibility transitions
PiperOrigin-RevId: 309767552
2020-05-04 14:52:19 -04:00
dniz
04c93ea5bb [Motion] Remove TransitionValues params from VisibilityAnimatorProvider interface methods
PiperOrigin-RevId: 309763088
2020-05-04 14:41:17 -04:00
dniz
ae7177d9de [Motion] Refactor MaterialVisibility to use constructor params for primary/secondary instead of abstract getDefault methods
Guarantees that the primary/secondary animator providers are initialized up front, which allows us to simplify the getters/setters to not have an initialization side-effect

PiperOrigin-RevId: 309435463
2020-05-01 15:08:35 -04:00
dniz
119954c881 Fix MaterialContainerTransform setScrimColor Javadoc error and getDrawingViewId/setDrawingViewId docs typo
PiperOrigin-RevId: 309404225
2020-05-01 15:06:33 -04:00
hunterstich
d3ec2d82de [Motion] Update container transform invalid scrim color logic
PiperOrigin-RevId: 308802757
2020-04-28 06:58:00 -07:00
hunterstich
d025a3b2c3 [Motion] Replace MaterialVisibility subclass static constructors for standard constructors
PiperOrigin-RevId: 308793749
2020-04-28 06:52:44 -07:00
hunterstich
dc7d3a5d4d [Motion] Make public transition classes final which are not meant to be subclassed.
PiperOrigin-RevId: 308711224
2020-04-27 18:52:51 -04:00
hunterstich
407193625b [Motion] Add getters and setters to MaterialContainerTransform.ProgressThresholds
PiperOrigin-RevId: 308694078
2020-04-27 18:12:15 -04:00
hunterstich
e63cae59fb [Motion] Update MaterialVisibility to not need initialize method
- Add initialization check for secondary animator provider in MaterialVisibility so subclasses no longer need to explicitly call MaterialVisibility#initialize.

PiperOrigin-RevId: 308687877
2020-04-27 18:05:51 -04:00
dniz
cd36c2f5e7 [Motion] Update transitions to be based on androidx and add transitions platform subpackage to support Activities, Windows, etc.
PiperOrigin-RevId: 308651633
2020-04-27 17:32:30 -04:00
Nicklas Ansman Giertz
48a6f2892b [Motion] Use a private ID resource for the tag ID in MaterialContainerTransform
Resolves https://github.com/material-components/material-components-android/issues/1230
Resolves https://github.com/material-components/material-components-android/pull/1231

GIT_ORIGIN_REV_ID=df1fe9abcd9910302ef0ab97f34153e83a548467
PiperOrigin-RevId: 307895262
2020-04-22 17:45:40 -04:00
dniz
b8c0496584 Fix nullability annotations in MaterialContainerTransformSharedElementCallback
PiperOrigin-RevId: 307661071
2020-04-22 15:08:21 -04:00
dniz
57a8ebdcdd Fix Activity container transform unexpected flash and fade
PiperOrigin-RevId: 307090565
2020-04-17 15:21:26 -04:00
SatoShun
9813cc5666 [MaterialSharedAxis] fix javadoc
Resolves https://github.com/material-components/material-components-android/pull/1210

GIT_ORIGIN_REV_ID=04314d6ef1150fc41e125ea6e49a3636413a7282
PiperOrigin-RevId: 307059021
2020-04-17 15:18:58 -04:00
hunterstich
2a2792d4fb [Motion] Remove context parameter from MaterialContainerTransform.
PiperOrigin-RevId: 304389543
2020-04-03 09:57:54 -07:00
hunterstich
148938ca84 [Motion] Update MaterialFadeThrough and MaterialFade to use MaterialVisibility and remove context param.
This updaes the remaining transitions to compose themselves of two animators instead of two visibility transitions. This also removes the context parameter from MaterialFadeThrough, MaterialFade and MaterialSharedAxis' constructors.

PiperOrigin-RevId: 303332658
2020-03-27 11:40:38 -04:00
hunterstich
5b07d02c8e Refactor MaterialSharedAxis to be composed of two animators.
Resolves https://github.com/material-components/material-components-android/issues/1047#issuecomment-594966218

PiperOrigin-RevId: 301619025
2020-03-18 17:37:50 -04:00
hunterstich
fe1651939c Fix motion java doc lint errors
PiperOrigin-RevId: 300415917
2020-03-13 10:52:20 -04:00
hunterstich
0f0942bdfd Fix container transform flashing on API 22.
Resolves https://github.com/material-components/material-components-android/issues/1061

PiperOrigin-RevId: 298752245
2020-03-05 13:05:24 -08:00
hunterstich
05804ddade Improve error message when container transform is unable to find an ancestor for the drawing view id.
PiperOrigin-RevId: 296884487
2020-02-24 18:28:14 -05:00
hunterstich
70f447d77e Fix gradle build and lint errors for transition package.
PiperOrigin-RevId: 294971841
2020-02-13 13:55:08 -08:00
hunterstich
a3a9793fb1 Fix container transform crash on API 21 and 22 due to path unioning.
PiperOrigin-RevId: 294924927
2020-02-13 13:49:21 -08:00