Commit Graph

4 Commits

Author SHA1 Message Date
Tony Wickham
676e29ce5d Merge "Added copywrite comments to pinch-related classes." into ub-launcher3-calgary 2016-03-25 15:46:20 +00:00
Sunny Goyal
ed268c2c89 Preventing unnecessary object creations
> Only creating the animator when required
> Canceling a previously running animation when starting a new one
> Directly setting LinearInterpolator instead of using null

Change-Id: I4f5f25f26dfed9b5c78665af4e74dd565b4cd805
2016-03-24 15:31:13 -07:00
Tony Wickham
1743ac4691 Added copywrite comments to pinch-related classes.
Maybe we should write a script that checks that this is present in
all our files? I didn't do a thorough check, but wouldn't be surprised
if others were missing.

Change-Id: I4777ff618f952b9b11fde60ebc8d897cf6449032
2016-03-17 19:17:34 +00:00
Tony Wickham
dadb304b46 Pinch to zoom out into overview mode.
There are 3 classes coordinating the gesture: PinchToOverviewListener,
PinchThresholdManager, and PinchAnimationManager.
- PTOL listens for the pinch gesture on DragLayer.
- When a pinch is detected, the PTOL keeps track of the interpolated
  progress and passes it along to both the PTM and PAM.
- The PTM uses the progress to determine whether a new threshold has
  been passed, and tells the PAM to animate it if so.
- The PAM uses the progress to animate things like workspace scale
  throughout the pinch.
- If the pinch ends early, the PTOL uses the last passed threshold to
  determine whether to animate to workspace or overview, and tells
  PAM to perform the animation at the same velocity as the pinch.

Bug: 24414635
Change-Id: I9e53706c705f8b2982409bf7c223d8d0e9618bf0
2016-03-04 16:52:54 -08:00