tweaking parallax effect
- adding vertical parallax when switching to all apps/customize mode
- added effect to have parallax lag the rest of scrolling
- adjusted the amount of horizontal/vertical parallax in both portrait and landscape modes
Change-Id: I5ee778f78c1080337f642217bcf828b2392ddf70
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 6c9aac1..bb59678 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -888,6 +888,14 @@
invalidate();
}
+ protected float maxOverScroll() {
+ // Using the formula in overScroll, assuming that f = 1.0 (which it should generally not
+ // exceed). Used to find out how much extra wallpaper we need for the overscroll effect
+ float f = 1.0f;
+ f = f / (Math.abs(f)) * (overScrollInfluenceCurve(Math.abs(f)));
+ return OVERSCROLL_DAMP_FACTOR * f;
+ }
+
@Override
public boolean onTouchEvent(MotionEvent ev) {
// Skip touch handling if there are no pages to swipe