summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/PagedView.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-01-12 20:24:50 -0800
committerMichael Jurka <mikejurka@google.com>2011-01-13 22:30:59 -0800
commitc5b262ccf639fedac2aff5bb8238342f95396338 (patch)
tree63c4aa5cb378bf9746a700b663461465ff14bcb2 /src/com/android/launcher2/PagedView.java
parentf16e571330f030e445c4f7f63f55d093337ffd87 (diff)
downloadandroid_packages_apps_Trebuchet-c5b262ccf639fedac2aff5bb8238342f95396338.tar.gz
android_packages_apps_Trebuchet-c5b262ccf639fedac2aff5bb8238342f95396338.tar.bz2
android_packages_apps_Trebuchet-c5b262ccf639fedac2aff5bb8238342f95396338.zip
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
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r--src/com/android/launcher2/PagedView.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 6c9aac1db..bb59678f6 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -888,6 +888,14 @@ public abstract class PagedView extends ViewGroup {
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