[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:
hunterstich 2020-09-10 10:27:28 -04:00 committed by ymarian
parent df0401bd29
commit 06322aadb9
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);