mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-18 19:11:39 +08:00
[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
This commit is contained in:
parent
df0401bd29
commit
06322aadb9
@ -42,7 +42,7 @@ public final class FadeThroughProvider implements VisibilityAnimatorProvider {
|
||||
return createFadeThroughAnimator(
|
||||
view,
|
||||
/* startValue= */ 0f,
|
||||
/* endValue= */ 1f,
|
||||
/* endValue= */ view.getAlpha(),
|
||||
/* startFraction= */ PROGRESS_THRESHOLD,
|
||||
/* endFraction= */ 1f);
|
||||
}
|
||||
@ -52,7 +52,7 @@ public final class FadeThroughProvider implements VisibilityAnimatorProvider {
|
||||
public Animator createDisappear(@NonNull ViewGroup sceneRoot, @NonNull View view) {
|
||||
return createFadeThroughAnimator(
|
||||
view,
|
||||
/* startValue= */ 1f,
|
||||
/* startValue= */ view.getAlpha(),
|
||||
/* endValue= */ 0f,
|
||||
/* startFraction= */ 0f,
|
||||
/* endFraction= */ PROGRESS_THRESHOLD);
|
||||
|
||||
@ -47,7 +47,7 @@ public final class FadeThroughProvider implements VisibilityAnimatorProvider {
|
||||
return createFadeThroughAnimator(
|
||||
view,
|
||||
/* startValue= */ 0f,
|
||||
/* endValue= */ 1f,
|
||||
/* endValue= */ view.getAlpha(),
|
||||
/* startFraction= */ PROGRESS_THRESHOLD,
|
||||
/* endFraction= */ 1f);
|
||||
}
|
||||
@ -57,7 +57,7 @@ public final class FadeThroughProvider implements VisibilityAnimatorProvider {
|
||||
public Animator createDisappear(@NonNull ViewGroup sceneRoot, @NonNull View view) {
|
||||
return createFadeThroughAnimator(
|
||||
view,
|
||||
/* startValue= */ 1f,
|
||||
/* startValue= */ view.getAlpha(),
|
||||
/* endValue= */ 0f,
|
||||
/* startFraction= */ 0f,
|
||||
/* endFraction= */ PROGRESS_THRESHOLD);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user