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
This commit is contained in:
1 parent
f16e571330
commit
c5b262ccf6
3 files changed
+184
-39
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user