Commit Graph

24 Commits

Author SHA1 Message Date
Sunny Goyal
b80941bb24 Using FloatProperty for spring animation, instead of a interface
to allow easier generalization of animation definitions

Change-Id: I37b1a604003ec007aa390eabdfe8c1ab733b7471
2019-06-19 21:31:43 -07:00
Jon Miranda
86f6c449a7 Add springs for recents dismiss animations.
Bug: 111698021
Change-Id: If518ba5946ea6fada67f549f2f29e1ab1c89969d
2019-01-29 12:13:57 -08:00
Sunny Goyal
55bdeed7bb Removing various reflection based animations, to allow for better proguarding
Change-Id: If9df24ea4170e8a3d336057d1c3dc800934fc1ac
2018-09-21 18:21:04 +00:00
Sunny Goyal
f0b6db7fa8 Removing static launcher activity dependency from FirstFrameAnimationHelper
Static dependency does not work in the presence of multiple activities and
when the main activity is not Launcher (eg in fallback recents). Instead
creating FirstFrameAnimatorHelper on demand for individual animations.

Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
2018-08-13 16:10:18 -07:00
Sunny Goyal
849c6a2b18 Removing Launcher activity dependency on various animations
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)

Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.

Instead associating a target with various animations which automatically
cancels the animations when that target goes away.

Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
2018-08-10 13:31:46 -07:00
Tony Wickham
0f640b6c1b Make fling thresholds consistent
There are 3 places we can block a fling:
- Swiping from home to all apps (through overview)
- Swiping from an app to all apps (through overview)
- Dismissing a task (in the same gesture that started by swiping down)

In all of these cases, we block the fling when crossing the threshold
to a new state (e.g. OVERVIEW), but unblock if the user pauses their
drag. With this change, the logic is consistent:
- Unblock the fling after pausing a short amount of time
- If a fling was blocked, increase the settling duration based on
  velocity

Bug: 78089840
Bug: 78658678
Change-Id: I5ef52b74229418b867b26c3c6d3db2cf6e48914b
2018-05-16 13:47:20 -07:00
Sunny Goyal
ea529083bd Using view elevation for shadow during click feedback instead of
creating a shadow bitmap

Change-Id: I331186664c3c448596af3172e0e080921a6a1908
2017-11-08 15:13:10 -08:00
Sunny Goyal
3e3f44c3ad Exposing the state manager directly instead of providing various helper methods for state change
Bug: 67678570
Change-Id: If3d05c804c034ffa5e403da8eaa23e85e373c863
2017-10-25 13:41:13 -07:00
Sunny Goyal
4c7f215651 Moving Workspace states into a separate file
Bug: 67678570
Change-Id: I5c63b4df29ca0f58a0223fb1919abc132576a1b6
2017-10-18 09:17:43 -07:00
Sunny Goyal
aeb1643ec6 Launcher state management cleanup
> Removing Widgets and related states
> Fixing different durations being used when opening/closing all-apps
> Removing some unnecessary object allocations when changing state without animation
> Differentiating widget bootm sheel and full sheet in logs

Bug: 67678570
Change-Id: Ic169528736d04ee0b38564b4f96595ba066eabda
2017-10-17 12:42:08 -07:00
Jon Miranda
2d89ea8453 Fade in background scrim when resuming from screen off.
This change hides the hard cut off that appears when the Launcher
window is transitioning upwards when resuming from when the screen
is off.

Bug: 36446766

Change-Id: I0c0fe13ee9e08d27b94916d0407ef431d82b8d6a
2017-05-11 12:32:28 -07:00
Mario Bertschler
c06af333cb Minor Refactoring only: no functional change
- organizing imports
- remove redundant modifiers on LauncherCallback interface
- fix typos

Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-28 12:23:22 -07:00
Tony Wickham
7f3526a1a4 Update notification view to match newer specs
- Use smaller radius for notifications round rect background
- Remove "Notifications" header, and clip children to round rect path
- Flip main notification so that icon shows on the right instead of
  left; footer is also flipped so animation makes sense
- Clean up animations to animate view outline instead of height

Bug: 32410600
Change-Id: I6bd1e1f8395b3703f28c3b0056a89e67672368ab
2017-02-24 12:09:06 -08:00
Jon Miranda
cda3bfb2e1 Remove unused View parameter from ofFloat method.
Change-Id: I5fabd5c78de52ba68b67e0b1bd7208f4d1f7cbea
2017-02-06 15:54:41 -08:00
Tony Wickham
9438ed414f Add swipe-to-dismiss notifications in popup menu.
- Next secondary icon animates up to replace dismissed main notification
- Add padding around main notification so it always aligns with the
  straight edges of the view (not the rounded corners); looks more
  dismissable
- Notification view collapses as notifications are dismissed
- To mimic system notification behavior, we copy SwipeHelper,
  FlingAnimationUtils, and Interpolators. We also apply elevation
  to notifications and reveal a darker color beneath when dismissing.

Bug: 32410600
Change-Id: I9fbf10e73bb4996f17ef061c856efb013967d972
2017-01-25 17:36:31 -08:00
Tony Wickham
1636cddbb4 resolved conflicts for f685c7e5 to ub-launcher3-master
Change-Id: Iddf78c166f9ab89ffae2ddc819c9ba5cf5e988be
2015-10-12 13:34:28 -07:00
Tony Wickham
0bb211a9d5 Actually call LauncherTransitionable.onLauncherTransitionStep().
Previously, it was only called at the start and end of the transition;
now it is called as the animation interpolates. Specifically, a dummy
ValueAnimator is played alongside the transition animation and calls
dispatchOnLauncherTransitionStep() as it goes.

One place where this is important is in Workspace, where
mTransitionProgress is used to determine things like whether the
workspace should accept a drop - hence the bug that caused apps dragged
from All Apps to vanish when dropped before the transition ended.

Bug: 24215358
Change-Id: I32cd633c53557305caf84e87c9a4d4f07eef2223
2015-10-05 16:57:09 -07:00
Sunny Goyal
5d2fc32e6d Several animation calls cleanup
> Using View property instead of strings to avoid extra reflection step
> Using ViewPropertyAnimator when several properties are being animated

Change-Id: I41625643b38b70bac11e2c81d18058ec878d73bd
2015-07-31 13:07:14 -07:00
Adam Cohen
1558893b87 Make sure all transition components run on the same thread
-> The framework circular reveal transition runs on the render
   thread which can cause problems when mixed in an AnimatorSet
   with transitions that don't run on the render thread
-> See issue 17556455

issue 21445293

Change-Id: Ie19c184c55060651e817d426ec83049b06af56ba
2015-05-27 13:55:09 -07:00
Sunny Goyal
7066003b20 Various lint error fixes.
> Fixing some RTL errors by specifying both marginStart and marginLeft
> Moving all layout direction checks to Utilities
> Explicitely adding @TargetApi before every method

Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
2015-05-14 12:28:07 -07:00
Adam Cohen
63f1ec00fb Further refinement of all apps / widgets transition
Change-Id: Id107a9aff74f014c07f8cbea6e74951a02dbddab
2014-08-13 21:39:48 +00:00
Michael Jurka
7c70d64d4c Prevent memory leaks coming from LauncherAnimUtils
Use weak references for global animation list

Bug: 11322014

Change-Id: I38bb9184e45840113129781fa83ab40ec96d3868
2013-10-23 15:22:17 +02:00
Michael Jurka
e206ff0f73 Fix leak when animations are created but never started
Bug: 11322014
2013-10-21 15:57:38 -07:00
Daniel Sandler
325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00