-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Is your feature request related to a problem? Please describe.
I am trying to leverage MaterialFade
, MaterialFadeThrough
, and others in my app. While these work fine as fragment transitions, they completely fail as view transitions for the following reasons:
- The "one-and-done" nature of transitions causes visual errors when the element being transitioned translates in any capacity
- Transitions cannot be substituted in to older APIs (See: Dialogs)
- Using transitions often fails for custom views
I would be much better if I was able to use these transitions as a native ObjectAnimator
that does not suffer from these issues.
Describe the solution you'd like
I want animator
/"Compat" emulations to at least MaterialFade
and MaterialFadeThrough
included in MDC's resources. If possible, having analogues for the MaterialSharedAxis
transitions would also be nice, albeit I do not need such at the moment.
These should be as faithful as possible to the actual Transition
implementations, but as ObjectAnimator
instances that would be more reliable as view animation.
#2998 has an example of such an emulation of MaterialFade
, albeit it is not an exact recreation.
I don't imagine this would be difficult, as the fade transitions seem to just be a combined scale and fade with specific interpolators and durations. "Container Transform" animations can't be converted to an ObjectAnimator
, so I do not expect such to be implemented.
Describe alternatives you've considered
Doing this myself. However, I am not knowledgeable about the exact nature of the transitions, and they would likely differ from the real MaterialFade
that I use in my app. I would like the guarantees that a MDC-included implementation is faithful to the material design specification.