Fixing typo in swipe helper causing views not to be faded when swiped.

Bug: 63516235
Test: Enable flag to fade when swiped and verify it fades
Change-Id: I49e7840d5423d018c1f88a02e8b272c80d0143a2
This commit is contained in:
Winson Chung
2017-08-10 14:13:37 -07:00
parent 57ae4db225
commit d8a52f237c

View File

@@ -203,7 +203,7 @@ public class SwipeHelper implements Gefingerpoken {
return Math.max(1 - progress, 0);
}
return Math.min(0, Math.max(1, progress / SWIPE_PROGRESS_FADE_END));
return 1f - Math.max(0, Math.min(1, progress / SWIPE_PROGRESS_FADE_END));
}
private void updateSwipeProgressFromOffset(View animView, boolean dismissable) {