Commit Graph

363 Commits

Author SHA1 Message Date
Vadim Tryshev
a2adac6a91 Removing accessibility description from page indicators
The current page is announced upon switching to it.
Is should be done this way for all future page implementations with
indicators.

Bug: 77827828
Change-Id: I8ba3bd9d068954df51d6de45da79133ede12c96d
Test: Manual
Merged-In: I8f2f163a261dd7098939674d39e014236fc66d5d
2018-04-17 19:52:18 +00:00
Vadim Tryshev
eeaa8ee6c2 a11y: disabling animation for task list swipes
Bug: 77632611
Test: Manual
Change-Id: Ibbfba5f3219d63a5604544eea33422ee91f54c01
2018-04-11 12:23:42 -07:00
Vadim Tryshev
2c430b34cb Avoid duplicate accessibility announcement upon switching to -1st page
Since -1st window already has accessible description, no need to
announce "Page X of Y" for it.

Bug: 74210311
Test: Manual
Change-Id: I5cbfd763778b5f7049be732a750df4501b5419e0
2018-04-05 10:53:08 -07:00
Vadim Tryshev
e6bbefb768 Making task list carousel accessibility-scrollable
No pane titles yet, as they are not yet reasonably supported by
Talkback.

Bug: 72409756
Test: Manual
Change-Id: I3d2317b9180ac6b02977a4ee8212ae30f0533b2f
2018-04-03 14:38:44 -07:00
Sunny Goyal
00c9c9a6fc Adding an empty message in RecentsView
Moving the content instead of translating the view. This ensures
that the empty message fades in place while the other content come-in
from the side.

Change-Id: I081d2e21206de24ad530814cb6a8ca7c3e293724
2018-03-26 17:24:12 -07:00
Sunny Goyal
a9f554681d Applying the alpha to individual tasks instead of the view
> Removing hotseat from overview in transposed layout
> Removing face scrim from recents view in transposed layout
> Removing focued background from pagesView as individual poges have focus states

Change-Id: I620527241bf7240009c4187f53f5a5cff0c3e2b1
2018-03-26 12:11:00 -07:00
Tony Mak
4f521af287 Fix work tab is not highligted properly
Change-Id: Iffa14e56f16bf67f1c6e605b2d303dd8fb38ba6e
FIX: 71703082
2018-03-15 16:37:34 +00:00
Sunny Goyal
20a13ff54e Updating the swipe-to-dismiss animation
Swipe to dismiss animates the page translation so that the
final position at the endof swipe is same as the final position
on removing the task view.

Change-Id: I393acd5ae75cd94797bb4f1aa3dd3ec9017cbb47
2018-03-14 12:32:26 -07:00
Winson Chung
87dd782e40 Merge "Unloading thumbnails from task views once recents is hidden" into ub-launcher3-master 2018-03-13 23:42:46 +00:00
Winson Chung
c7c5158916 Unloading thumbnails from task views once recents is hidden
- Re-enabling the high res thumbnail loader, ensuring that we clean up
  the visible recent tasks when the associated views are removed
- When the recents state is re-entered, we will trigger the loading of
  the data anew (which will usually just fetch data from the existing
  cache if launcher was not stopped)

Bug: 74537246
Change-Id: I9cd69015461e1de34b4b65faeb9adb8aebd1dd3d
2018-03-13 20:47:36 +00:00
Sunny Goyal
7c7be8c20a Simplifying options popup and overview handling
> Removing support for page drag-n-drop from pagedView
> Removing Overview UI from Launcher3 without quickstep and using options popup instead
> Removing touch handlers from CellLayouts and showing options popup based on workspace long press
> Excluding touch outside inset when showing the popup

Bug: 74136505
Change-Id: I34c2a7ff58452db26f5d1a85d554be40fc75f2b8
2018-03-13 12:57:32 -07:00
Sunny Goyal
857b1b9469 Notifying page end transition if forceFinish is called in the middle
of page transition

This fixed the bug where onPageTransitionEnd is never called when using
quickswitch

Change-Id: I4196a8651ee67d175363d51165dd128fe0518341
2018-03-05 11:32:12 -08:00
Winson Chung
62a70be27a Enable trim memory callbacks to the loader, background task preloading
- Also enable the high-res thumbnail loader

Bug: 73651529

Change-Id: Ic23997f10289ea10cb1f41104e07029c9102c
Signed-off-by: Winson Chung <winsonc@google.com>
2018-02-28 12:55:19 -08:00
Tony Wickham
b7168cd019 Merge "Flip recents if setting is true" into ub-launcher3-master 2018-02-27 19:50:17 +00:00
TreeHugger Robot
f1e9a706f6 Merge "Use getScaledTouchSlop instead of MIN_LENGTH_FOR_FLING" into ub-launcher3-master 2018-02-27 18:07:23 +00:00
Tony Mak
2e564400ba Fix all apps tab fling detection
It is a regression when we changed from ViewPager to PagedView.
Unlike ViewPager, PagedView does not take "yDiff" into account
when determining should it intercept its child MotionEvent.

Override determineScrollingStart, just like what we did in Workspace

Change-Id: I25f7415c45c370629558d944f59bf95c741b9319
FIX: 73878167
2018-02-27 17:29:12 +00:00
Tony Mak
c25afd002b Use getScaledTouchSlop instead of MIN_LENGTH_FOR_FLING
MIN_LENGTH_FOR_FLING is not correct because it is not scaled
based on density.

BUG: 73878167
Change-Id: Ibbb58a573976224f33fd43de33719ddb62131329
2018-02-27 14:44:50 +00:00
Tony Wickham
dfb5cc9a09 Flip recents if setting is true
Bug: 72860694
Change-Id: I5cb71f553b2833a18a1b419b3744175bff963da8
2018-02-26 18:12:39 -08:00
Sunny Goyal
0bd7f4f2dc Using paged view for all-apps tabs
Bug: 72811152
Change-Id: I0cca426d935f079c923b93fe3d4399f87778fe95
2018-02-13 09:55:29 -08:00
Winson Chung
05a31ede4f Defer launching the quickscrub task until after the page settles
- Tweak the durations to be less laggy
- Add some state logging

Bug: 67957962
Bug: 70180755
Change-Id: Ia0caa5178b3ed976705eb2d973bc00d8f1b9e3ca
2018-02-09 12:43:36 -08:00
Sunny Goyal
85a7fe086b Some fixes for quickstep when configuration changes
> Creating the launcher animation after first draw, so that the UI is in correct state
> Using correct workspace size, when layout is not valid
> Snapping pagedView to correct page when page size changes
> Resoting to correct workspace page on rebind

Change-Id: I74e61a05aae3a3c4912d4c5c8eb4d5d036d9005a
2018-02-02 11:02:51 -08:00
Sunny Goyal
ce8809a588 Reapplying state UI when the insets change
Change-Id: Ief9588400f332b2c5b084a8a11c3102b2c20c4ea
2018-01-18 14:03:19 -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
Tony Wickham
07b1d670f2 Animate to the workspace card when transitioning from overview to home
Change-Id: Ib2c2288fd935f678a5c7a354be09c6d852d86b41
2018-01-05 14:15:10 -08:00
Sunny Goyal
e15e2a8267 Adding an empty page in Recents view corresponding to workspace
The page is aligned to the workspace card and shows a widgets button
in the empty region

Change-Id: I479c47a2fbac4b3ef1aaf833d9fe82b5d7e10ddc
2017-12-19 10:06:15 -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
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
1c9bf6a19c Add carousel curve effect to RecentsView.
Pages scale down and tuck underneath the centermost page.

Change-Id: I12686cd72634f758ef71828033eb4e22339ef185
2017-11-17 10:25:27 -08:00
Sunny Goyal
ac00cba35c Simplifying workspace layout
Instead of creating workspace view larger than the screen size (so that it can be
zoomed out), restricting the size to the parent size and bypassing the drag events
directly to Workspace (since the workspace is smaller when zoomed out, it might not
qualify for all events otherwise).

Change-Id: I45e213dd6d16bec5feb6e7cf90bc6f7de4c6d305
2017-11-13 16:00:06 -08:00
Sunny Goyal
5bc6b6f14c Consolidating various interpolators
Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
2017-10-26 16:38:55 -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
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
b72d8b2c8b Using common fling detection logic for notification and all-apps
> Refactoring SwipeDetector to both allow vertical and horizontal swipes
> Using SwipeDetector and common overscroll effect for notification swipes
  instead of a separate logic

Change-Id: Ib706ee179811ade59ddb68184e1c202365d147c4
2017-07-20 01:33:10 -07:00
Tony
a361c7204f Ensure mCurrentPage is valid after page is removed
Specific case this addresses: removing work profile
- Removing work profile causes workspace to be rebound
- This means pages are removed and re-added
- As icons are added back to the pages, they use the
  context of the current page to ensure theming is
  correct (see ag/1919636)
- Without this change, the current page could be null,
  causing a crash. Now we make sure the index is valid.

Bug: 62699220
Change-Id: I0aa1d0c2c6150c51dacb2eb860e4dacd183b3505
2017-07-04 09:43:06 -07:00
Hyunyoung Song
3f5a11f3a5 Add user event logging for page rearrangement and LEFT/RIGHT swipes
1. Call logOverviewRearrange logging call ONLY when the order actually changed
2. Call logActionOnContainer when containers are swiped.
Bug: 32457561
Bug: 32457561

06-30 11:23:04.082  6585  6585 D UserEvent: action:SWIPE direction=LEFT
06-30 11:23:04.082  6585  6585 D UserEvent:  Source child:WORKSPACE id=2
06-30 11:23:04.082  6585  6585 D UserEvent:  Elapsed container 50436 ms session 50436 ms action 0 ms
06-30 11:23:04.082  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:04.082  6585  6585 D UserEvent:  isInMultiWindowMode false

06-30 11:23:08.266  6585  6585 D UserEvent: action:SWIPE direction=LEFT
06-30 11:23:08.266  6585  6585 D UserEvent:  Source child:WORKSPACE id=1
06-30 11:23:08.266  6585  6585 D UserEvent:  Elapsed container 54620 ms session 54620 ms action 0 ms
06-30 11:23:08.266  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:08.266  6585  6585 D UserEvent:  isInMultiWindowMode false

06-30 11:23:10.742  6585  6585 D UserEvent: action:SWIPE direction=LEFT
06-30 11:23:10.742  6585  6585 D UserEvent:  Source child:WORKSPACE id=0
06-30 11:23:10.742  6585  6585 D UserEvent:  Elapsed container 57096 ms session 57096 ms action 0 ms
06-30 11:23:10.742  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:10.742  6585  6585 D UserEvent:  isInMultiWindowMode false

06-30 11:23:17.286  6585  6585 D UserEvent: action:SWIPE direction=RIGHT
06-30 11:23:17.286  6585  6585 D UserEvent:  Source child:WORKSPACE id=-1
06-30 11:23:17.286  6585  6585 D UserEvent:  Elapsed container 63639 ms session 63639 ms action 0 ms
06-30 11:23:17.286  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:17.286  6585  6585 D UserEvent:  isInMultiWindowMode false
06-30 11:23:19.879  6585  6585 D UserEvent: action:SWIPE direction=RIGHT
06-30 11:23:19.879  6585  6585 D UserEvent:  Source child:WORKSPACE id=0
06-30 11:23:19.879  6585  6585 D UserEvent:  Elapsed container 66233 ms session 66233 ms action 0 ms
06-30 11:23:19.879  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:19.879  6585  6585 D UserEvent:  isInMultiWindowMode false

06-30 11:23:23.811  6585  6585 D UserEvent: action:SWIPE direction=RIGHT
06-30 11:23:23.811  6585  6585 D UserEvent:  Source child:WORKSPACE id=1
06-30 11:23:23.811  6585  6585 D UserEvent:  Elapsed container 70165 ms session 70165 ms action 0 ms
06-30 11:23:23.811  6585  6585 D UserEvent:  isInLandscapeMode false
06-30 11:23:23.811  6585  6585 D UserEvent:  isInMultiWindowMode false


Change-Id: I11a48ee44aaa87863e76ccf2b46f499c28e96748
2017-06-30 13:59:38 -07:00
Adam Cohen
8d769d6620 Revert edge glow effect and restore damped overscroll
Bug 62628421

Change-Id: Iab6ac567e98e63ade34de8817c3ae1f58c25ba19
2017-06-27 09:29:34 -07:00
Sunny Goyal
65d9ceb383 Disabling page fling while the overlay is moving
Bug: 37959201
Change-Id: I2278a46d10bc81855e10f97e669460e0d0b93daa
2017-05-08 12:10:32 -07:00
Sunny Goyal
9b29ca5add Defining HomeScreenElementTheme for elements which appear on top of
wallpaper

> Using HomeScreenElementTheme for workspace items
> Fixing view inflation where wrong layout inflater was being used

Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
2017-02-17 11:37:30 -08: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
76dbf6fafd Fixing onPageBeginTransition not being called when scrolling overlay
Bug: 33693546
Change-Id: If212a196648fbb2c725ca4800a157ec24f278ca8
2017-01-04 09:29:16 -08:00
Mario Bertschler
83d40e0608 Merge "Fixes a bug where the user ends in freescroll state even for regular workspace mode." into ub-launcher3-master 2016-12-29 23:33:01 +00:00
Mario Bertschler
dcc26fc693 Fixes a bug where the user ends in freescroll state even for regular workspace mode.
The bug happened while reordering pages in overview mode and clicking the back button.
The fix is to check the precodition in enableFreeScroll if we are in a valid state for enabling freescroll (currently only overview mode).

Bug: 33347786
Change-Id: Icc3005fd431569e2b9e3f52d2249de8ba8d13eab
2016-12-29 12:03:35 -08:00
Sunny Goyal
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Jon Miranda
6a85817dfc Don't add focusables when getDescendantFocusability is FOCUS_BLOCK_DESCENDANTS.
Bug: 32315286
Change-Id: I6fc6600fc9cbf83f720d9e6e878735076cd52cf1
2016-10-27 14:14:31 -07:00
Sunny Goyal
9ccafbff26 Removing custom dispatchDraw logic and letting the system handle
selecting appropriate children for drawing.

> System already skips children which are outside the bounds. Originally
this logic was added because workspace layout is larger than the screen, and
we need to selectivly skip more children. But over time we have added many
special conditions and at present workspace actually draws more children than
needed at any given time.
> Fixing bug, where onBeginPageMoving was getting called during folder open

Bug: 12116740
Change-Id: Idee18ee9cd9d348ebc4dfd82f4ff6df14e0d22d2
2016-10-26 17:14:12 -07:00
Tony Wickham
6982de2485 resolve merge conflicts of 2fd0208 to ub-launcher3-master
Change-Id: I20ad6eaace81786be080e28d6eb551908add6d90
2016-10-12 14:38:43 -07:00
Tony
2fd0208605 Use Launcher.getLauncher(Context) instead of type-casting.
Bug: 32010039
Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
2016-10-07 12:50:01 -07:00
Hyunyoung Song
0de011705b Code sanitization
- Removed bad method/class name typos

Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
2016-10-06 10:57:29 -07:00
Sunny Goyal
fe770c9feb Cleaning up restore instance state logic
Restore instance state is only used for first binding. But in case of restore,
the binding happens synchronously, so there is not need to store the bundle
in a global variable

Change-Id: Ibc496bcd7c0d171056b8afc69f2c4d9a1270d40c
2016-09-28 11:35:13 -07:00
Sunny Goyal
4ff424abf9 Fixing overlay scroll state not getting reset properly when
scrolling is was cancelled

Bug: 30834333
Change-Id: I3605cd2dd939057905d297b5a25ce8669d578125
2016-08-12 13:14:56 -07:00