Commit Graph

39 Commits

Author SHA1 Message Date
Vadim Tryshev 1b0c5032d1 Fixing keyboard navigation when Overview list is empty
Bug: 80155387
Change-Id: Ife86fe4b718ef01291a04b21020155110d75fa7b
Testing: Manual
2018-05-24 13:06:18 -07:00
Sunny Goyal 56e1019e95 Making caret visibility part of state definition
> Hiding the caret in fast overview state
> Hiding caret in task swipe down interaction

Bug: 79700605
Change-Id: I984d535bc75802501e8aeb13c8f37387f331e5bc
2018-05-22 15:58:20 -07:00
Tony Wickham b2ddf10041 Update interpolators and durations for state animations
When we enter overview (overview appears, workspace disappears):
- Workspace scales down from 1f to .8f with OvershootInterpolator(1.2f) at 200 ms
- Workspace fades from 1f to 0 with OvershootInterpolator(1.2f) at 200 ms
- Overview scales down from 1.33f to 1f with OvershootInterpolator(1.2f) at 200 ms
- Overview fades from 0 to 1f with OvershootInterpolator(1.2f) at 200 ms

When we exit overview (overview disappears, workspace appears):
- Workspace scales up from .92f to .1f with DecelerateInterpolator() at 200 ms
- Workspace fades from 0 to 1f with AccelerateInterpolator() at 200 ms
- Overview scales up from 1f to 1.1f with AccelerateInterpolator() at 180ms
- Overview fades from 1f to 0 with DecelerateInterpolator(1.7f) at 200 ms

Parallax while the finger moves: Workspace translates half the distance as the shelf

Bug: 79776746
Change-Id: I319d982cf202bcd6dbbcd68ffc5c0c7853629c7e
2018-05-16 15:59:31 -07:00
Sunny Goyal 5d1873a812 Removing scrim overdraw
> Moving all the scrims to draglayer to avoid creating multiple layers during
  various animations
> Removing sys-ui scrim in various states which alread have a background scrim

Bug: 74556464
Bug: 78585335
Change-Id: I8a3fd34ed440f3c7d2e19b3cdb4b72723c535602
2018-05-10 10:52:31 -07:00
Tony Wickham 56b247da1d Merge "Add atomic recents animation while swiping up" into ub-launcher3-edmonton 2018-05-09 20:13:23 +00:00
Sunny Goyal ef39540dde Adding a carent in the scrim
> Caret is only visible when the accessibility is enabled
> It is visible in NOTMAL and OVERVIEW state and moves out of the
  scrim along with the scrim.
> Acts as an accessible target for various options

Bug: 78172350
Bug: 79215734
Change-Id: I8a968b67e36901859649546295f6491d49cc9ce9
2018-05-09 12:39:30 -07:00
Tony Wickham 6becf7c07d Add atomic recents animation while swiping up
State handlers can now specify atomic and non-atomic components of
their animations to states, which can be specified when creating a
new animation. There is now one atomic animation, when going from
NORMAL to OVERVIEW (and in reverse):
- RecentsViewStateController's animation (scale/alpha) is all atomic
- WorkspaceStateTransitionAnimation has atomic and non-atomic:
  - Hotseat and workspace alpha is atomic, as is workspace scale
  - Everything else (scrim, translation, qsb and drag handle alpha) is
    non-atomic
- All apps progress is non-atomic

Also simplified dragging through overview; no longer pulls against you,
so we use an OvershootInterpolator when flinging instead of our custom
interpolator for the spring effect.

Bug: 76449024
Bug: 78089840
Change-Id: Iafac84d0c2b99ee9cf9dd5b30e2218286713b449
2018-05-09 12:33:46 -07:00
Sunny Goyal 927447e71d Chaniging all-apps scrim
> Converting the scrim to View, to better avoid overdraw
> Overview and Spring loaded state have different scrim alpha
> When going from overview to all-apps, there is a color scrim drawn over the overview panel.
  The slef color is merged with this color to prevent overdraw, and the remaining screen is drawn
  with a cut-out round rect path

Bug: 79111591
Change-Id: I26801fde13dd6adb4b06110bbe8087e35cc31847
2018-05-08 08:29:43 -07:00
Tony 0c95559cbc Change overview animation to scale instead of translationX
As you swipe up to overview from home, workspace scales down and fades out as before,
and now recents scales down from 1.2f on top of it. The interpolators are set such
that the workspace animation is seen before the recents animation. Also, we don't
scale down all of recents, only the visible pages (current and adjacent).

Change-Id: I5f8bfe8cafeaa41d26873c63549735d7bdff2bce
2018-04-04 13:48:42 -07:00
Tony Wickham 1c6f12d119 Swipe down on hotseat to launch recent task
If you're ever in overview and swipe down on the hotseat, it will launch
the focused task *unless* you entered overview from the workspace and
have not scrolled past the first task. This is a hidden state to allow
for reversibility of the swipe up from workspace.

Also moved PendingAnimation from quickstep to launcher3.

Change-Id: Iea077bc0ef7c74f6bf7b98d0a638892b9c5fe36c
2018-04-03 11:20:49 -07:00
Sunny Goyal 81b4c7bb3c Adding a custom view for DragHandle
> Separating page indicator and drag handle
> Page indicator always draws irrespactive of oriantation
> Drag handle is responsible for accessibility interactions
> Adding assissibility actions for DragHandle

Bug: 72500733
Change-Id: I9030337456964af1bdf77f1c01956452321f9229
2018-03-26 15:52:03 -07:00
Tony e9054e3207 Remove quick switch and improve quick scrub
- Hide hotseat and center recents vertically during quick scrub
  - Don't animate the state change if launcher wasn't already visible, but still
    wait until the window animation completes before scrubbing past the next app
- Change interpolator of window as it scales offscreen during quick scrub, so that
  it gets out of the way faster and you can see the motion of the next app taking
  its place
- Remove haptic when snapping to task when quick scrub starts (there's already a
  haptic from the home button)

Bug: 70180755
Change-Id: I83f25bc8b791da0676c13fd62698e1f486dc016f
2018-03-22 15:50:19 -07:00
Sunny Goyal 7a80b59e97 Swipe interaction changes on home screen
> Increasing the distance to travel for the first swipe
> Adding support for custom interpolators when building an animation
> When quickly swiping twice from home, finished the first animation

Change-Id: Ibc3c8667e9b927376fd99f08f0ca027f2398914b
2018-03-21 17:55:35 -07:00
Tony Wickham bd6f05e0b6 Separate some elements to set visibility separately
Added entries for:
- All apps header extra content
- Hotseat extra content

Change-Id: I47c4ccfe3b54fd47cbbee88698ed045611e3e92d
2018-03-21 12:15:48 -07:00
Tony Wickham 76cf236596 Hide back button in drag-n-drop and quick scrub
Add a state flag to hide the back button, used by NORMAL, SPRING_LOADED,
and FAST_OVERVIEW states.

Bug: 74390697
Change-Id: Ifdb2aa41691db4594ea597fc5b5839967711b43d
2018-03-20 14:18:34 -07:00
Sunny Goyal 7185dd63eb Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
2018-03-19 20:02:34 -07:00
Tony 3bb5e8e56c Set RecentView's translationX based on to/from state
Also make sure to reset it when setting the state without animation,
otherwise it's possible for recents to stay translated offscreen
when it's not being animated back (e.g. when swiping up after
launching an app from all apps).

Bug: 74602990
Change-Id: Ib0596c84cfb67242f436f9aba8af53556d5ca743
2018-03-14 22:06:28 +00:00
Sunny Goyal 623eddd7e8 Updating Launcher rotation logic
When auto-rotate is on, launcher allways allows rotation. This allows uses to use
locked rotation feature is available on the device
When auto-rotate is off, workspace does not allow rotation, but overview in quickstep
will allow rotation

Bug: 73872056
Change-Id: Ie12365c268fd5e4958634ed97b5a33dcadc691e2
2018-03-03 00:41:09 -08:00
Sunny Goyal 6c6c2f45f7 Adding a separate state for QuickScrub
Bug: 74014237
Change-Id: Ie86ac589f0ad0e1470fb6b0b71263ec6593eb1e3
2018-03-02 15:38:21 -08:00
Sunny Goyal 6639a5dfe0 Updating the scrim and landscpae ui
> Instead of views, using a custom class to draw the color scrims
> All-apps has full screen UI
> Quickstep does not have search box in landscape

Bug: 73085356
Change-Id: I360a78a2ade0134daad29fe712796cd39a381fbb
2018-03-01 11:23:46 -08:00
Sunny Goyal 75c59acf5c Ensuring that Recents view is always loaded when going to Overview state
Change-Id: If2337a0be66f4ca68dd54954b7368f38d70a40d4
2018-01-16 12:01:57 -08:00
Sunny Goyal 49bcf34e81 Adding a back stack to go to overview from all-apps
Change-Id: I94e7c27aa505123ddbe40ffa29b1bbc9b2748293
2018-01-11 14:45:11 -08:00
Sunny Goyal 228153d92a Updating landscape layout for launcher/quickstep
> Hotseat is tied to navbar (on left in seascape)
> Search box shows up in Overview (clicking it would crash for now)
> All-apps is no longer fullscreen in landscape
> Recents cards are appropriately scaled down
> Hotseat is visible in Overview

Bug: 70179916
Change-Id: I53149eaeac9557e8a01021b7e2d139f3d6ceef37
2018-01-08 13:53:44 -08:00
Sunny Goyal 9328a51271 Adding translationX to workspace card to that it is slightly visible
behind the first card

Change-Id: Idc0c169fb92510e74b983160778bd9dbacf29943
2017-12-22 11:21:18 -08:00
TreeHugger Robot 4aa4c5a911 Merge "Hide hotseat in landscape overview" into ub-launcher3-master 2017-12-12 23:10:56 +00:00
Tony Wickham a447bd884b Hide hotseat in landscape overview
Bug: 70179916
Change-Id: Ib277a054cf16233ab9156a4448c41952e3295fae
2017-12-12 14:58:50 -08:00
Sunny Goyal 0c723353a6 Enabling swipe up from overview to all-apps
> Fixing wrong alpha interpolator when swiping down from all-apps

Change-Id: I7d4200c89797e5609fd7c4aa8681dea2ffd00bf7
2017-12-12 12:20:23 -08:00
Sunny Goyal bc683e9d06 Separating various UI properties into state variables
> Using workspace scale and translation for all-apps
> Without quickstep, workspace has the parallex effect as before
> With quickstep, workspace scales down to match the recents card width
> Using a single animator for recents views in case of state transtion and
  controlled transition to prevent going into inconsistant state.

Change-Id: I1864de6892052ca771f4d0062e3d60c28840a72d
2017-12-06 14:29:33 -08:00
Tony Wickham 53370678ce Allow hotseat items to be clicked in overview
Bug: 70179573
Change-Id: Ib2cbd7b12e5e1287d652d703e95c15ca6ea12a4e
2017-12-05 11:40:21 -08:00
Sunny Goyal c4fa8c312b Changing the state UI logic for normal build and quickStep build
> Creating ShareHandlers for managing UI
> In normal build, hotseat is hidden in overview, while in QuickStepBuild, it is visible

Change-Id: I5f8d35c75b861d912d93fce186b5dd74106184c3
2017-11-07 12:24:47 -08:00
Sunny Goyal 85525173ce Rearranging the code structure to allow replacing state logic.
Change-Id: I6f83d0f77045ba189f02dd465bf70ffc2a239aa1
2017-11-06 14:57:50 -08:00
Sunny Goyal 031022029b Using state animation to control all-apps transition
> Separating all-apps transtions control and vertical shift touch handling
> Creating separate spring handler for search box (to avoid adding and removing spring)
> Driving all-apps vertical shift using state AnimatorSet

Bug: 67678570
Change-Id: I3b6a4d1f43275a5f485b399444742b6b9a8c4bb9
2017-10-31 15:29:02 -07:00
Sunny Goyal 9d341964a0 Setting up build rules and placeholder code for QuickStep
Change-Id: Ib4ad5c6082b293fc9f9455d70e2b21462b4ab76d
2017-10-30 10:04:24 -07: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 be93f264d7 Moving all-apps state logic to an independent class
Unifying all the paths for state change to a single flow

Bug: 67678570
Change-Id: I0773c0f59ae1ef324c507bc1aae188d8c059dea4
2017-10-23 16:33:58 -07:00
Sunny Goyal c99cb174c3 Moving some state specific logic to subclass of LauncherState
Bug: 67678570
Change-Id: I1316f91c9f19bd572e4a0da67a22fa8921e1dcf9
2017-10-20 13:56:47 -07:00
Sunny Goyal cd7c0aad5f Changing LauncherState to a class to allow adding custom functionality
Bug: 67678570
Change-Id: I777e335e9fdf7014b041addff6b8e54fb94167bb
2017-10-19 12:37:11 -07:00
Sunny Goyal f9403d92fa Removing state definition from Launcher
State is only maintained is workspace and is used for all the UI

Bug: 67678570
Change-Id: Ie3cce5a1f4ada3913d0480f7918c27460dacbd34
2017-10-18 15:04:22 -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