Commit Graph

121 Commits

Author SHA1 Message Date
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
31fbd4c08b Fix some state issues with user-controlled animations
Previously, user-controlled animations weren't properly being canceled when a
non-user-controlled animation started, e.g. when hitting home. Thus, we could
end in the wrong or inconsistent state because the user-controlled animation's
end runnable was still used. Now we add a cleanup callback for when we reset
the user-controlled animation for one that isn't user-controlled.

Also fixed a couple typos.

Tests (easier with animation durations extended):
- Swipe up and hit home before reaching overview -> land on home
- Go to overview, swipe down slightly (before threshold to go to workspace)
  and let go -> return to overview without flash (recents was resetting)
- Swipe up, press home while swiping -> goes home, stops responding to drag
- Start dismissing task and hit home before it finishes (or while dragging)
  -> goes home, stops responding to drag

Bug: 78249220
Change-Id: If11d8999e3fadba38c987b25af67cd2304cd859b
2018-05-01 13:45:27 -05: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
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 Wickham
a97f0f20cd Support multiple Views of extra hotseat content
Also adjust workspace page indicator:
- Center vertically
- Rounded corners

Change-Id: I96c2f3da3522d70726f544126b516c33c8fb7bc8
2018-03-21 15:53:11 -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
Sunny Goyal
7185dd63eb Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
2018-03-19 20:02:34 -07:00
Sunny Goyal
7b4b78c1ad Page indicator and hotseat should have the same alpha
Bug: 70144077
Change-Id: I4cc678e7b5a5daa07b5fd6ab96ea79b4354c514d
2018-03-06 13:12:25 -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
19d32b76dd Removing multi-state apha control for hotseat
Change-Id: I68ccbe96caa70921aefd18fc8ec9ad0638c3fab1
2018-01-19 14:26:44 -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
Sunny Goyal
b532dfe45d Updating the hotseat background to a solid color with rounded corners
Change-Id: I297920518f925e122f2e9f55a68228b96b42ea27
2017-12-14 11:43:48 -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
d0030b05f5 Adding placeholder method for compat implementations for Accessibility manager
> Moving some utility methods to the compat class

Bug: 69611105
Change-Id: Ide0cab0b926d7bc03617fc568d2a2b429ee00cd9
2017-12-08 16:09:45 -08:00
Sunny Goyal
3c585ddbf7 Removing view layer support during state animation.
View layer was only being used when fading in/out hotseat in overview.
From API 21+, android automatically create layers when animating alpha

The current support for view layers does not work properly when cancelling
animations and controlling partial animations

Change-Id: I2d5785471af9819575beefe65f1f2bdd28c76bd5
2017-12-07 14:18:16 -08:00
Sunny Goyal
e3c6d58b71 Adding support for tagging animations per controller, so that they can be controlled independently
Change-Id: I6f360362aa16f7e02fe5fe84976b23663f228030
2017-12-07 12:46:26 -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
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
TreeHugger Robot
4fc994c988 Merge "Consolidating various interpolators" into ub-launcher3-master 2017-10-27 02:35:30 +00:00
Sunny Goyal
5bc6b6f14c Consolidating various interpolators
Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
2017-10-26 16:38:55 -07:00
Sunny Goyal
ea60926c3f Moving mState from Workspace to StateManager
Bug: 67678570
Change-Id: I8cdab044d0760fcc4c188830cde4f963d072b907
2017-10-25 15:48:01 -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
4d519f2568 Enable overview state restore
> Reapplying CellLayout state when new pages are added (page bind comes after restore)
> Removing support for different scroll range for freescroll (the calculations were not
  consistant with maxScroll)

Bug: 67678570
Change-Id: Ic1911de1b707f2f6940e7040f07ca7e733e2ef2a
2017-10-24 10:39:24 -07:00
Sunny Goyal
2104c3025a Fixing mNewScale was never getting initialized
Change-Id: I03507cedc65a805d122ab2161a0162c21ac5975f
2017-10-23 15:04:32 -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
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
Sunny Goyal
7ce471bdf6 Removing support for CustomContent screen
The supported way to customize Launcher and add a "-1 page" is by
using LauncherOverlays. Custom content screen is no longer supported.

Change-Id: I3f8a2734c287d1a69ae0c038ec1de1d45fa1b464
2017-09-08 14:06:30 -07:00
Hyunyoung Song
d725f644b7 Remove LAUNCHER3_ALL_APPS_PULL_UP
Bug: 63712253
Verified: all apps transition fully functional
Verified: NO_ALL_APPS_ICON = false case also works.

Change-Id: I779fb7bd4927c5923da3f85590d912dbbbcdef4d
2017-08-21 11:59:14 -07:00
Jon Miranda
7f522a25c3 Optimizations to reduce all apps jank.
* Since adding springs to the apps in All Apps, it is no longer
  efficient to build a hardware layer for it.
* Pre-uploads bitmaps to RenderThread.
* Only add overview animations if we are transitioning to/from it.

Bug: 63711551
Change-Id: I948267598e95ec59dc156acb9abe6b5b789110c0
2017-08-02 12:41:33 -07:00
Sunny Goyal
966d901af0 Removing QsbBlockerView
> Removing workspace state change listener. State change happens with hardware layer,
  so children should not be calling invalidatge() during the animation
> Moving QSB inside the QSB and removing a floating layout

Bug: 37616877
Change-Id: I9af3522a05dafa5796586bb64f512d98688caf79
2017-06-06 16:48:25 -07:00
Sunny Goyal
9e76f682f3 Removing wrapper around ViewPropertyAnimator, and using ObjectAnimator
instead

Bug: 35218222
Change-Id: Ic714cf7d20989cb45f07712e8a6f6659d0e3f30d
2017-02-16 11:19:01 -08:00
Sunny Goyal
1c581c6d61 Bug fix: QSB sometimes gets stuck to transparent.
At some places, we were calling removeAllListeners before calling cancel
 on an animation. AnimationListeners are also used to track states, and
 removing listeners before canceling will prevent onAnimationEnd to be
 called, thus preventing state cleanup.
 PinchAnimationManager was causing ZeroAlphaAnimatorListener to be removing
 from Qsb alpha animation, making the MultiStateAlphaController think there
 is a zeroAlpha animation running.

> Removing all instances of removeAllListeners
> Updating various affected listeners to handle onAnimatinoCancel
> Fixing WorkspaceStateTransitionAnimation, which was animation QSB alpha
  on page scroll index

Bug: 31910152
Change-Id: Ie7f31b67d4c502badcdd41f7b04867d1f35f5d27
2016-11-24 15:32:45 +05:30
Sunny Goyal
db36437931 Moving saving state transtion listener logic to individual views
Change-Id: If5402b6961d7d6be0c50778f27a8746ed6f1bbfb
2016-11-14 17:43:31 -08:00
Sunny Goyal
b5e65c8bd3 Calling buildLayer only on views which are actually visible
> Creating a common listener for handling buildLayer logic

Bug: 30138067
Change-Id: I803ef78b48e07e5ae5922e0392d390f274a87d75
2016-10-26 18:34:21 -07:00
Winson
61d9e78f23 Ensure we still build the hw layers when pulling up all apps.
Bug: 30310330
Change-Id: I0d9f2fe01230bdb333c098b5515fc196ac2da2dc
2016-07-22 15:07:23 -07:00
Sunny Goyal
6178f13e2d Moving the QSB out of the cell layout to the Drag layer
This allows better edge matching for the QSB. The QSB position
is kept synchronized with the page scroll and all-apps transition.
But its not visible in spring loaded and overview mode

Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
2016-07-13 12:37:08 -07:00
Hyunyoung Song
230b2b7f44 Second workspace page icons should not show up when all apps is shown in landscape.
b/29931405

> Also some method names to setTranslation -> setTranslationAndAlpha to
match its implementation.

Change-Id: Icb6ec5df8a267a9024803c70a694ea9b76e5e34d
2016-07-06 15:03:59 -07:00
Hyunyoung Song
a97c64bf9f Fix hotseat flicker
b/29648104

Change-Id: I74eea09ab5c4d03c0df3b4a82c7636299edf4d32
2016-06-30 15:30:53 -07:00
Sunny Goyal
6d64d88b0f Fixing alpha of workspace components being changed at too many places
> Hotseat alpha is changed by all-apps controller, workspaceStateTransition
and overlay transition. Created a 3 state alpha for hotseat and pageIndicator
> Simplified the page-background and alpha animation during state transition
by moving the code in the same if block
> Disabling partial page fading when pull-up all apps is enabled. This fixes
the bug when pressing home with all-apps opened causes other pages to disappear.

Change-Id: I4a75b89af12b48e9fbc49514e641fd424d07199c
2016-06-27 10:43:04 -07:00
Hyunyoung Song
eac1dac239 All apps pull up work
b/28917826
b/29469966
b/29542376

- Move state transition to when the finger is lifted and not when
the view settles.
- Refactor the vertical pull detector to use bit operation to define
which direction scroll to allow.
- Fixed many issues regarding screen rotation
- Fixes issue where slowly sliding the all apps goes into overview mode
- Fixes issue where quick slide up leads to animation starting from middle

Change-Id: I2384a0fcc5550e17359a044ef506bcc66507da5f
2016-06-21 16:37:13 -07:00
Hyunyoung Song
97d89e9249 Fixing workspace transition state
Change-Id: I394d587aa84aefa174220380a6dfb25bad133fde
2016-06-20 09:59:28 -07:00
Hyunyoung Song
a9a8a42217 UI fixes to All apps pull up work
b/28917826
- nav bar change to light when top of the all apps container
passes y mid point of the status bar
- apps search edit box change when top of the all apps passes
the bottom of nav bar
- Restrict pull up to work only if the ACTION_DOWN event started
from the hotseat.
- Landscape: reverted old padding and margin. Only the interaction
is different.
- Tuning of the motion spec
- Animation duration respects fling speed more agressively.
- and many more small bugs...

Change-Id: Icde4093c41eeab8c9c6d9dc8b7d57adc3b171349
2016-06-15 16:45:48 -07:00
Sunny Goyal
47328fd53f Removing the SearchDropTarget bar as it no longer contains the QSB
> Renaming it to simply DropTargetBar
> Moving AppInfo to the top bar as well
> The workspace pages will extend to the top edge (minus some padding).
Since the QSB is no longer displayed on top of every page, there is
no reason to reserve the space.
> In spring-loaded mode, the workspace cell layout will scale enough
to make room for the drop target bar at the top

Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
2016-06-06 16:15:46 -07:00