Commit Graph

72 Commits

Author SHA1 Message Date
Sunny Goyal
8a2a63b3f0 Moving click and long click handling for items from launcher to separate class
Change-Id: I1d12862205f7fa7f3671ff351e66dba58bb430e2
2018-03-08 15:21:42 -08:00
Mario Bertschler
14a89262f1 Using edge effect to trigger spring animation for all apps.
Bug: 72811152
Bug: 72059944

Change-Id: Ied7b51caa2fb48a2fda126d59e4eaf6a35edded3
2018-03-08 11:16:53 -08:00
Sunny Goyal
b1d222e9a7 Removing support for app prediction from Launcher3
Derivative projects can extend the FloatingHeader to add support
to custom content in all-apps screen.

Change-Id: I4e29221a72e5a077a756713a6774cda7ecde8f1b
2018-01-30 20:53:11 -08:00
Sunny Goyal
01ce755753 Removing unused app discovery support
Change-Id: I670be29851b232caa5c05624ae37ae5e92a8b65f
2018-01-23 13:53:03 -08:00
Tony Mak
b5950bbd6c Update label accordingly when work mode is changed
Also, updates the work related strings accordingly.

Fix: 71987096

Change-Id: Iedbf6ee04f3a165a392efdf2bd351817997817ca
2018-01-16 21:33:56 +00:00
Tony Mak
6eeb040d86 Consume work mode API
Fix: 69905244

Change-Id: I5958b3a2ebba2fa0e0f69448d5526dc72ed6a97b
2018-01-04 19:06:01 +00:00
Tony Mak
2bfa4d469a Make work footer stick to the bottom if there are only a few apps #2
1. Move the work footer divider into the container, so it is translated
   with the rest of the footer.

2. Fixed the scrollbar issue in work tab by putting the footer height
   in AllAppsRecyclerView

3. We planned to drop the company name, and decided to use
   "Managed by your organisation".

4. Rename WorkModeToggleContainer to WorkFooterContainer as
   we are using work footer in else where.

BUG: 70571983
Change-Id: I218fe7d9970780a1a457ee450f1a32e7a46d9766
2017-12-15 11:40:07 +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
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
Android Build Merger (Role)
232d7196fa [automerger] Fix bug where recycled BubbleTextView kept their badges. am: 5254944a68
Change-Id: Icb486e7a529aae15d5f959487c489ef1ad5798b1
2017-10-26 18:35:10 +00:00
Jon Miranda
5254944a68 Fix bug where recycled BubbleTextView kept their badges.
Bug: 68324671
Change-Id: Id5f4db6706afd002242d95d44422fc61042798c8
2017-10-26 11:34:55 -07:00
Jon Miranda
610af37575 Add springs when user clicks on caret / all apps snaps to top.
Bug: 65373058
Change-Id: I9cc5c4c98fd3e5b53d597c4493f2dcef6d9be94a
2017-09-05 23:20:27 +00:00
Jon Miranda
c90a89d997 Add spring to QSB when opening all apps.
Bug: 64355491
Change-Id: I760856a32779b314c8b01ef2c051985e18b68ecb
2017-08-23 14:04:31 -07:00
Jon Miranda
e309c6dc24 Fix getAppPosition calculation since search divider removed from RV.
The app position calculations were off by 1 since the search divider
used to be the first item in the RecyclerView.

Bug: 38349031
Change-Id: I8c161b940ec8015aab85b0aab94718e6fee8fcbd
2017-06-27 08:37:14 -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
Jon Miranda
b28c4fcf35 Landscape grid changes for Workspace/All Apps.
This is the just first CL to get eyes on the changes.
Next CL will update the All Apps to be full width.

Bug: 37015359
Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
2017-06-23 11:47:48 -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
Jonathan Miranda
6d60532167 Revert "Decrease jank in all apps physics."
This change created an issue where some items appear to not have springs when the device does not have that many apps.

This reverts commit 9d7f2b9e0d.

Change-Id: I8e79cf3f86972fde8184debb6ab4d0f32283a8bd
2017-06-06 20:36:24 +00:00
Jon Miranda
9d7f2b9e0d Decrease jank in all apps physics.
By creating the spring in onCreateViewHolder and adding
in onBindViewHolder, we are able to take advantage of
RecyclerView's prefetching optimizations.

Bug: 38349031
Change-Id: Ie445039fd90ca92ae4ce1ff71c57b15f662377a8
2017-06-05 14:27:20 -07:00
Jon Miranda
4e11c2738a Add physics motion to items in all apps.
Motion applied to:
- Icons
- Prediction icons
- Prediction divider

Bug: 38349031
Change-Id: I376e6e39080c8c80463a0ce8b104b05e4d576f17
2017-05-23 10:02:51 -07:00
Sunny Goyal
dc19a07aba Adding support for top padding in BaseRecyclerView. The scrollbar is
drawn below the top padding.
Also adding callback for getting the all-apps vertical pull range
so that it can be controlled by SearchUiManager

Bug: 37616877
Change-Id: Ib4642073f3e92f6676caede3bddd652fda89c86f
2017-05-15 14:14:04 -07:00
Sunny Goyal
161f96bc77 Moving apps search related logic into a custom layout file
This will allow derivative projects to easily change the search behavior
by simply overriding the xml file

Bug: 37616877
Change-Id: Ib8d6a2dab06819a52611e9a3d97c70c5a49bbf97
2017-05-08 14:43:32 -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
Mario Bertschler
0fc6f684e7 App discovery integration in All Apps search
This is the basis for app discovery integration while searching in all apps.
This does NOT include binding to the actual service and retrieving results,
but instead provides all the UI to show suggested instant apps and apps
from a store with star rating and pricing.

Change-Id: I1605b52848491acee4ac1d15c0112e6a768363f6
2017-03-03 13:05:57 -08:00
Sunny Goyal
4497361984 Fixing accessibility description for all-apps grid adapter.
Only counting app icons towards various collection related info

Change-Id: I2aca87e1acf6cd7bdaddfbaad174e273e8272d4b
2017-02-21 16:45:48 -08:00
Sunny Goyal
2a65020da1 Removing the section break UI support
This was an exploration for an alternative UI in all apps, where we
show section headers before every section. This was never released.

Change-Id: I2d36f1d078cc9a6f3ba6f0ec9655412182c9b016
2016-10-13 09:39:36 -07:00
Tony Wickham
6e74e899d3 Refactor shortcuts drag and drop.
- Instead of creating our own drag view within the container, and
  handling logic to determine when to start a real drag, we start
  the drag immediately and just defer onDragStart().
- To determine when the deferred drag should start, we add a
  DeferDragCondition to DragOptions. The default DeferDragCondition
  never defers a drag, but is overridden for apps with shortcuts
  to defer until the icon is dragged a given distance.
- Because the drag is handled in DragController, including checking
  when to start the deferred drag, DeepShortcutsContainer no longer
  needs to handle touch events and ShortcutsContainerListener has
  been removed.

This change has several immediate benefits:
- The code is much cleaner, because it allows touch handling to be
  done by the DragController through the normal drag flow, without
  recreating logic in ShortcutsContainerListener/DeepShortcutContainer.
- The janky second haptic feedback has been removed (now it vibrates
  when you long press, like everywhere else, but not again when the
  shortcuts close after dragging a distance).
- Drops are animated, instead of just popping the icon back into place.

Bug: 30769920
Bug: 30465972
Bug: 31533078
Change-Id: I679b412b72fbf6c3895d76963311eb5010c8e8db
2016-09-23 18:44:47 -07:00
Hyunyoung Song
4ebc3d070f Change NavBar to transparent black
b/30615471

Change-Id: I7885e8a7fd63ee10c9b0107087046730e8acfde9
2016-08-05 10:59:17 -07:00
Hyunyoung Song
852974375d Merge "Centered all apps search text" into ub-launcher3-calgary 2016-07-21 00:35:05 +00:00
Winson
1f06427266 Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due
  to insets.  This is necessary since there are now different layouts
  depending on which side the navigation bar is on
- Consolidating hotseat and other layout into the device profile 
  launcher layout logic
- Making the all apps icons match the workspace icon height
- Tweaking caret drawable to draw to the bounds specified to simplify
  layout in each orientation
- Fixing minor issue with page indicator shifting in landscape
- Centering overview buttons to the workspace page

Bug: 30021487
Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
2016-07-20 10:17:08 -07:00
Peter Schiller
a92447a7fd Centered all apps search text
Change-Id: I21aaec56cd2202cea284880a28d9513435877368
2016-07-19 12:21:10 -07:00
Winson
e8eaa9c94c Ensuring that fast scrolling to predictions scrolls list to the top
- Fixes a long standing issue with fast-scrolling to the predicted apps
  not quite scrolling the list to the top of the screen.
- Fixes an issue where we don’t scroll exactly to the fast scroll 
  position due to rounding
- Also fixes a small issue where the thumb would not update when the 
  fast scroll popup was no longer showing, even while dragging.

Bug: 30023608

Change-Id: I6b5080c6aea521ff03dca24317f0405c02725061
2016-07-13 01:04:56 +00:00
Winson
b655b88500 Cleaning up scrollbar logic to properly calculate stable extents.
- Removing old logic which assumed that views were the same size,
  especially now we can have variable dividers, etc.
- Simplifying old scroll position logic.
- Removing unnecessary prediction icon layout (same as normal icon)

Bug: 30023608
Change-Id: I39e1126fa586a76a9bdd3ff38cd6e360ac3021e6
2016-07-12 12:16:26 -07:00
Peter Schiller
c2a20ff0a8 Consolidate all the dividers to provide same look and feel
Bug: 30017936
Change-Id: I072cb116dba1df555a63f3f67b730f7f9c3a235a
2016-07-08 15:02:03 -07:00
Peter Schiller
243ad3dbf8 Updating alignment of search input
Bug: 30017936
Change-Id: I2f68711762872bc100b41b2b4768d33e2c0cd902
2016-07-07 18:52:51 -07:00
Tony Wickham
1bce7fd342 Long-press on an app to reveal its shortcuts.
- Add ShortcutsContainerListener to icons on workspace, folders, and
  all apps. This handles long-press and forwards following touches to
  the DeepShortcutsContainer that is created.
- Drag over shortcut before lifting finger to launch it.
- Shortcuts are rendered in pill-shaped DeepShortcutViews,
  which are inside DeepShortcutContainer on DragLayer.
- The shortcut container orients above or below the icon, and left or
  right-aligns with it. Biases for above + left-align.
- Long press a DeepShortcutPill to drag and pin it to the workspace.

Bug: 28980830
Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
2016-06-29 17:48:46 -07:00
Andrew Sapperstein
abef55a1c1 Update Launcher to use theme colors.
Instead of using hard-coded variants of colors, use the theme color
that corresponds (colorAccent, colorPrimary, etc).

Updated:
- "Search for more apps" text
- App info drop target hover color
- PageIndicatorDots
- All apps & widget scroll bar & scroll popup colors
- All apps section text color
- widget picker background color

TODO:
- widget picker header color

BUG: 28625102
Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
2016-06-20 11:46:44 -07:00
Sunny Goyal
ae50284e0a Moving LauncherAccessibilityDelegate to Launcher to associate it with
activity lifecycle.

Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
2016-06-17 08:44:51 -07:00
Sunny Goyal
b7c2e99ffb Merge "Updating the app search buton text" into ub-launcher3-calgary 2016-06-08 22:35:32 +00:00
Sunny Goyal
3333b0ced8 Unifying focus indicator handling for workspace and all-apps
Adding an abstract FocusIndicatorHelper based on FocusIndicatorView
which draws the background instead of using a dummy view.

Change-Id: Id560195323d2ddad8fcd77ba675cf3f4fd4a94ab
2016-06-08 15:00:09 -07:00
Adam Cohen
6e92f05314 Ensure that custom actions are available to all apps items
-> When BubbleTextViews were being recycled, the RecyclerView was clearing the
   AccessibilityDelegate. Ensure that this is reset by the adapter when a
   BubbleTextView is reused.

issue 25948877

Change-Id: I95dd21bfdcd602a67925d1b8f06e6ca92d1d7203
2016-06-07 14:33:03 -07:00
Sunny Goyal
8653f1d748 Updating the app search buton text
Bug: 28774501
Change-Id: I268a2d98f70d160c91ebd8fc796f3626ae67c159
2016-06-07 10:31:49 -07:00
Sunny Goyal
97660f7a94 resolve merge conflicts of 2494c3f168 to ub-launcher3-calgary
Change-Id: I807016057da9b867ebb2c8f3ee2027a3a2688d30
2016-03-03 13:52:22 -08:00
Sunny Goyal
2494c3f168 Moving createMarketSearchIntent to search controller to allow it to be customizable
Change-Id: I3a05abf7c0357a2f92c8a3fa2dc223f9eacc221e
2016-03-03 11:36:38 -08:00
Sunny Goyal
9e3fee1427 Starting market search whenever the search key is pressed
Bug: 27365428
Change-Id: I508cb35cd1aaab1eac6cf60014fa6f80592365ef
(cherry picked from commit 992a5f566e)
2016-03-03 18:36:35 +00:00
Sunny Goyal
992a5f566e Starting market search whenever the search key is pressed
Bug: 27365428
Change-Id: I508cb35cd1aaab1eac6cf60014fa6f80592365ef
2016-03-02 11:32:18 -08:00
Sunny Goyal
4759760bc9 Removing LauncherCallbacks control over app search
am: c42ac0a5a6

* commit 'c42ac0a5a6f0a4e41a9fc1b694f841204ae1989c':
  Removing LauncherCallbacks control over app search
2016-02-18 23:50:51 +00:00
Sunny Goyal
c42ac0a5a6 Removing LauncherCallbacks control over app search
Change-Id: Icb199607dea3f169055e44946272aa9f1e758d1d
2016-02-18 15:32:27 -08:00
Sunny Goyal
e72f1d1428 Accessibility delegate is already set in BubbleTextView constructor. Not need to set it again
am: e70fb6f8ef

* commit 'e70fb6f8ef03561b7875b872d0efa4ae2a5926af':
  Accessibility delegate is already set in BubbleTextView constructor. Not need to set it again
2016-01-07 21:54:24 +00:00
Sunny Goyal
e70fb6f8ef Accessibility delegate is already set in BubbleTextView constructor. Not need to set it again
Bug: 25948877
Change-Id: I1d301a6169404a78881fa29da6d6bdf2fec8f146
2016-01-07 13:51:09 -08:00