Commit Graph

189 Commits

Author SHA1 Message Date
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
da1e4b31f0 Fixing wrong check used for predictions
Change-Id: I990b101c32abe02a14d95bd00c0b63cda95b4066
2018-01-05 10:49:37 -08:00
Mario Bertschler
d8ab4671e3 Moving divider line into predictionview.
Change-Id: I40753aaa154023641cead2bd7dcf906fa5a4c2d7
2017-12-14 11:20:46 -08:00
TreeHugger Robot
ffa3bb97ff Merge "Ensures in all apps that the scrollposition and floating header translation are reset correctly on closing all apps and switching tabs." into ub-launcher3-master 2017-12-13 17:39:46 +00:00
Mario Bertschler
f66589db35 Ensures in all apps that the scrollposition and floating header
translation are reset correctly on closing all apps and switching tabs.

Change-Id: I86ba3e7bed4c27c485929af5920f76000d323875
2017-12-13 09:22:50 -08:00
Mario Bertschler
9f62d13ed8 Preserve top/bottom padding in PredictionRowView on updating insets.
Change-Id: Iba75902df46ff51b036d2ff117d4ab1ef2e1c0f8
2017-12-12 15:11:10 -08:00
Tony Mak
b74ac8d3a1 Merge "Tab indicator of work tab should be in orange color" into ub-launcher3-master 2017-12-08 11:09:31 +00:00
Mario Bertschler
527051aaba Minor refactoring of FloatingHeaderView and PredictionRowView.
The main purpose of the CL is to let the let the PredictionRowView
calculate its own height instead of setting it from outside and cleaning
up dead code in FloatingHeaderView.

Change-Id: I7d63ee51a1a2f64618f7fd287bcf4cdb8476caa2
2017-12-07 14:15:23 -08:00
Mario Bertschler
ea0eb4bb4b Forwarding touch events from floating header to recyclerview.
Additionally adds little sidepadding to the tabs buttons and fixes yPos
calculations for the scrollbar.

Bug: 69966700
Change-Id: I9d236ce7a782090f5d17931839f24b65b4ce7019
2017-12-07 08:54:36 -08:00
Tony Mak
195f005448 Tab indicator of work tab should be in orange color
Also fix the tab according to the spec.

Fix: 70272233

Change-Id: Ib4a0446d52a8488aadada1b823b3f541c4031d43
2017-12-07 15:37:38 +00:00
Mario Bertschler
3d87ed17b3 FloatingHeaderHandler refactored into custom view FloatingHeaderView.
No logical change.

Change-Id: I9a6dadb151872abe9915e96833af530ca08ddb8e
2017-12-06 11:45:49 -08:00
TreeHugger Robot
adaeeee690 Merge "Fixes for fast-scrollbar when using work profile tabs in all apps." into ub-launcher3-master 2017-12-06 17:29:22 +00:00
Mario Bertschler
2d3157a0bf Fixes for fast-scrollbar when using work profile tabs in all apps.
- do not hide scrollbar between switching tabs
- full scrollbar height
- show predictionrow only when fully scrolled to top

Bug: 70037972
Bug: 68713881

Change-Id: Icaa434ce2726b75d22ec4ac3287ab2b0e18ce42b
2017-12-05 14:36:16 -08:00
Tony Mak
191b688cc8 Bottom user education view shown in work tab
Introduced a BottomUserEducationView for similar use case.

Screenshot: https://hsv.googleplex.com/4856820942241792

BUG=69963630

Change-Id: Ia818ee44fa5ce97ad1778f33e6a9a3a36cea5017
2017-12-04 17:36:33 -08:00
Mario Bertschler
527fa71adc Enables searching when using work tabs together with fallback search.
Bug: 69966634
Bug: 68713881
Change-Id: I972696575b7559b5baf80b949437dcb2dc885f66
2017-12-01 10:57:05 -08:00
Mario Bertschler
a5f5483cb0 PredictionRowView: handling the case where no predictions are populated.
Bug: 68713881
Change-Id: I63efd5631f5ad3cb3028c02fd83deca00096b00a
2017-11-30 08:51:50 -08:00
Mario Bertschler
2f768cb5d9 Merge "Fixes rebinding worktab layout vs single recycler view (on workprofile change)" into ub-launcher3-master 2017-11-30 16:35:57 +00:00
Mario Bertschler
8a63a587c0 Merge "Fixes a bug when using the prediction row view and changing screen orientation." into ub-launcher3-master 2017-11-30 16:35:46 +00:00
Tony Mak
6ffe4e0eee Add work profile footer in work tab
Screenshot(work mode is on): https://hsv.googleplex.com/6279751685636096
Screenshot (work mode is off): https://hsv.googleplex.com/6279751685636096

TODO:
It is just the UX bit, once the platform change is in, we should then
consume the new API to
1. Turn on / off work mode
2. Get the organization name and set the textview accordingly.

BUG=69905244

Change-Id: Id94ae57625d6b629dac89c1c28f8d65f395fff6c
2017-11-29 20:37:11 +00:00
Mario Bertschler
44607301e2 Fixes a bug when using the prediction row view and changing screen orientation.
Bug: 68713881
Change-Id: I9740eee8425d42af87c8c788aefff9a99ae48d2f
2017-11-28 13:36:03 -08:00
Mario Bertschler
a4dedf426f Fixes rebinding worktab layout vs single recycler view (on workprofile change)
Bug: 68713881
Change-Id: I37bcc800ebeec54157eb1d342666d1695e46aaab
2017-11-28 12:27:29 -08:00
Mario Bertschler
2153e1c814 Implementation of PredictionRowView.
> Enable to use floating for prediction row even without tabs.
> Behind ALL_APPS_PREDICTION_ROW_VIEW feature flag.
> Expand/Collapse personal/work tabs in stopped intermediate state.

Bug: 68713881
Change-Id: I7817e7b7c6f572358f2b9a7a347339a9081708ee
2017-11-16 17:07:44 -08:00
Mario Bertschler
510a64d099 Adding a sliding tab strip to the custom tab layout.
Bug: 68713881

Change-Id: Ib0873482f80903611f183ccf430185f40a292f8e
2017-11-15 16:19:34 -08:00
Mario Bertschler
ac9408a5cd Enable work profile tab in all apps.
This CL will bring two tabs to all apps: Personal and Work,
currently only if the user has a workfile set up and
behind a feature flag defaulting to disabled.

Bug: 68713881

Change-Id: Ib5a558281ef3593359db3ad593ee1d0cf279f547
2017-11-14 10:28:54 -08: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
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
1797af41d1 Cleaning up drag state management.
When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
2017-10-16 13:06:52 -07:00
Sunny Goyal
f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
TreeHugger Robot
a9e345f886 Merge "Removing some methods from the DragSource" into ub-launcher3-master 2017-10-05 17:20:58 +00:00
Sunny Goyal
d0d0703399 Removing predicted apps reset on every onResume
Predicted apps should be pushed by the called whenever they change
instead of Launcher polling them on every UI update.

Bug: 67305604
Change-Id: Ibd3d809b09b7d8fd39036f69367e8580fb90dcef
2017-10-04 10:41:43 -07:00
Sunny Goyal
1ce9c476f7 Removing some methods from the DragSource
This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
2017-10-03 16:18:46 -07:00
Mario Bertschler
e4f03aaa4f Merge changes from topic "am-8d2845b1-eaaf-4e07-8e47-50ed5ddb898a" into ub-launcher3-master
* changes:
  [automerger] Integrating suggested app by handling new status flags for shortcut items. am: 8ff9e1d679
  Integrating suggested app by handling new status flags for shortcut items.
2017-08-25 21:37:51 +00:00
Sunny Goyal
81a70e5dc2 Adding scrim in all-apps scrim
Bug: 64692527
Change-Id: Ib8262ad0cc3c95cd419eb9fa1dee3bbbc2d25a27
2017-08-24 15:11:18 -07:00
Mario Bertschler
8ff9e1d679 Integrating suggested app by handling new status flags for shortcut items.
Guarded via feature flag SUGGESTED_APP.

Bug: 62483883

Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
2017-08-24 12:23:06 -07:00
TreeHugger Robot
b55b6264ae Merge "Remove LAUNCHER3_ALL_APPS_PULL_UP Bug: 63712253 Verified: all apps transition fully functional Verified: NO_ALL_APPS_ICON = false case also works." into ub-launcher3-dorval-polish2 2017-08-21 19:22:56 +00: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
Sunny Goyal
b23980cc0e Fixing duplicate/inconsistent definitions for model and callbacks
> 2 implementations for filtering workspace items
> 2 implementations for binding widgets
> duplicate logic for add and update appInfo

Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
2017-08-17 11:05:56 -07:00
Jon Miranda
7dfabaa02b Fix bug where all apps items fade in.
Removes all Add/Change/Move/Remove animations by
clearing the AllAppsRecyclerView ItemAnimator.

Bug: 64675794
Change-Id: I41f975ab6be4bf48c483828ea6f109382a8a9320
2017-08-15 10:33:54 -07:00
Jon Miranda
7653a60c74 Optimize updating All Apps Predictions.
* Prefetch existing predictions in onResume.
* Only update predictions if something has been changed.
* Swap predictions in place (if possible) -- this avoids
  having to relayout all of All Apps when just the predictions
  change.

Bug: 64126588
Bug: 63711551
Change-Id: Iffa0d9d7d6f99f606dd68b7df5893d6eba1574f5
2017-07-30 11:04:58 -07:00
Jon Miranda
2d5e0e067c All Apps physics polish.
With this change, the springs will now animate if your finger
is on the RecyclerView while you hit the top/bottom.

This covers the case when the user has few apps (ie. the
RecyclerView does not scroll very much).

Bug: 64041310

Change-Id: Ia72aea05d62a6fb896fdb7df379d6c7abd188d6d
2017-07-26 20:21:07 +00:00
Sunny Goyal
2b50b53183 Updating UserEventDispatcher to make some methods accessible.
> Removing helper methods around fillInLogContainerData so that its easier to
  create events with 3 and more srcTargets
> Removing setPredictedApps from userEventDispatcher as its specific to Launcher
  and does not apply to other activities. Instead moving it to AllAppsRecyclerView

Bug: 63719473
Change-Id: Ib92621e41ede4ffe03892642ab173772b5a84dd1
2017-07-19 11:03:35 -07:00
Jon Miranda
2b35905ea7 Add overscroll to the top of All Apps.
* Overscroll at the top of all apps will occur when the user scrolls
  up, hits the top, and continues to scroll up.
* Fixed bug where All Apps jumps when the user enters overscroll
  from a scroll that doesn't start at the bottom.
* Fix bug where AllAppsRecyclerView stays translated even after
  the user has finished dragging.

Bug: 62628421
Change-Id: Ia1d230a7cc07a7cf8c1a7c5211a025034ae5f6df
2017-07-05 14:58:34 -07:00
TreeHugger Robot
efbfcb838d Merge "Sanitizing various search container ids and layout names" into ub-launcher3-dorval-polish 2017-07-04 09:06:53 +00:00
Jon Miranda
35cb8aefea Polish for all apps physics.
By adjusting the start value based on the direction of the scroll,
the springs will appear more smooth.

This only changes the appearance of the spring when scrolling down,
since the start value has always been 1 and thus looked fine when
scrolling up.

Bug: 38349031
Change-Id: I563e6e7cfdbc74c4a95adb22f90d5efe17dfa453
2017-06-29 08:49:10 -07:00
Sunny Goyal
c7b8df8329 Sanitizing various search container ids and layout names
Bug: 63014381
Change-Id: Ia75a8a048c7a85c6324f8861abd2bcf1721032fa
2017-06-27 11:11:32 -07:00
Jon Miranda
ad3194ec81 Add overscroll w/ physics to All Apps.
Bug: 62628421
Bug: 38349031

Change-Id: If3ba6dfbbd3a4b1c87e69df0066f801f963752aa
2017-06-26 22:45:53 -07:00
Sunny Goyal
89d5c5a31b Updating fast scrollbar UI in Landscape
Creating a separate view for FastScrollBar and moving all the relavant logic in
the view.
For protrait, the touch handling is delegated by the recycler view just like before.
For landscape, the dcrollbar does not overlay with recyclerView and handles the touch
itself

Bug: 37015359
Change-Id: Ie1981326457ba739bdf0ac8063db1065f395f133
2017-06-26 14:56:36 -07:00
Mario Bertschler
cd04c89f89 Removing view.isInTouchMode() because plaform returns false when
using a mouse on long click.

Bug: 38204847

Change-Id: I5b10e8251f4f0a7b148c0404d5939a0fa8325a46
2017-06-22 09:29:46 -07:00
Sunny Goyal
5606e07059 Removing long press support from page-indicator
Bug: 62445549
Bug: 38163974
Change-Id: Ic0ae44ded7e4755c5401f327ce0d98a9ea96b2ab
2017-06-15 14:25:12 -07:00
Jon Miranda
5c83e7cdc5 Refactor and generalize SpringAnimationHandler.
SpringAnimationHandler is only responsible for motion tracking and
updating the list of springs it is handling.

Spring initialization and updates are handled by the AnimationFactory
interface.

This is done in preparation for future CLs where SpringAnimationHandler
will be used in more cases.

Bug: 38349031
Change-Id: I5ebce710cc05e4e88b708ceea5d2cfefbd0eb3d0
2017-06-07 15:45:45 -07:00