Previously there was only support for CellLayout to draw the
leave-behind. Added FolderIconParent interface so any parent can
draw the leave-behind, and implement that by TaskbarView.
Test: Open folder in Taskber, ensure leave-behind draws
Bug: 171917176
Change-Id: I08d1d939a34f971f893994fe05cac972d165ef53
- Add TaskbarActivityContext which allows shared Launcher elements to
"just work" using existing generic ActivityContext.
- TaskbarContainerView extends BaseDragLayer<TaskbarActivityContext>.
- Inflate FolderIcon and Folder using TaskbarActivityContext to be
shown in TaskbarContainerView.
- Use TaskbarActivityContext's DeviceProfile to determine icon size
instead of overriding in styles. This also ensures that normal
BubbleTextView icons have the same size as FolderIcons.
Test: Place a folder in home screen hotseat, ensure it shows up in
taskbar and can be opened, and that apps inside it can be launched
or dragged.
Bug: 171917176
Change-Id: Ic25d2f84bcd7e3399c88989305ea565497c030d9
These are the more generic versions of Launcher and DragLayer, so
that Folders can be used in other surfaces.
Test: Open and close Folders on home screen, ensure works properly
Bug: 171917176
Change-Id: I39b9aedbd8319ca61ea0e776bc95eab585e023d5
- Border spacing is the spacing between the cells.
- Workspace cell height is now fixed, and we allocate
all the "extra" space to three different variable height
areas.
* Built behind ENABLE_FOUR_COLUMNS flag because it hinders the
default grid.
Bug: 175329686
Test: - set border spacing to 0 and confirm matches prior layout
- test drag and drop still worked
- test reordering
- test widgets
- test folders
- test multiwindow
Change-Id: Ic6f3dff577d28ff214bda4b0a787ec7fd08c108b
Adding support for bulk removing items from a folder icon.
This fixes workspace item removal when a folder gets replaced
to an icon during the delete operation.
- Lets say user has a folder with the same app twice.
- User disables that app.
- Launcher removes all shorcuts of that app
However, because we call "replaceFolderWithFinalItem" during
this removal, we end up creating a new shortcut that does
not get tracked by the removal, so the user is left with
an enabled icon of the disabled app.
Bug: 162378169
Test: manual test, repo steps in bug
Change-Id: Iaf6550894c156b3b5ec2a5aa58bab76a4a28819e
UNLABELED -> title==null and EMPTY_LABEL -> title=="". When adding new items for the folder if the folder is in UNLABELED state, auto-labeling will be enabled.
This change also addresses auto-labeling issue due to false edit from UNLABELED to EMPTY.
Bug: 159164315
Change-Id: Ia17cd27b4afb60420dc15c544f544061fc46ad33
These events will help to understanding recall reduction is due to data coverage vs label coverage.
Bug: 159495871
Change-Id: Ia5e2cbab86f5f2072f9674fbd6abcdbc049929ee
=> Also fix the widget tray in these non-default grids, and the external shortcut addition flow. The layout was broken as it was scaling with the icon size. Instead keep it fixed which looks much better, similar to how we maintain all apps.
=> This also fixes a small jump when dragging shortcuts external to Launcher.
issue 154169001
Change-Id: Iad1e3859dd6fedccce9b5c6633e64426a4630c31
When item is dropped on a existing item resulting in new folder creation, triggers LAUNCHER_ITEM_DROP_FOLDER_CREATED event with details of the destination package.
This change also introduces new FolderIcon item to launcher_atom.proto to represent folder icon.
Screencast and sample logs: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.tmbucd1f44qp
Bug: 152978018
Change-Id: Ib4d343ba9075aa8853652f128457c4638541ec59
=> Extending on previous CL to separate multiple translation properties
and avoiding expensive layout pass
Test: manual
Change-Id: I058da7367fb320b9f432bef9482be2966d3a7d42
After ag/11020901, folder creation process will not open gboard and hence drag and drop events resulting in folder creation should send additional folder creation event.
Fixes NPE with ItemInfo.java.
Bug: 153768241
Change-Id: I52c996a62dee52bf07feef4252aadc2a28c79752
(cherry picked from commit 9a3671e80e)
=> We pull apart the scale and translation that are set in a fairly
static way due to split-screen vs. the general translation and scale
properties that might be used more dynamically, in this case
for re-order animations
=> This allows removal of some code that breaks reorder animations
due to the accrual of translations / scales in certain edge cases.
=> TODO in future CL: address other translation cases and make the throw
case for calling base setTranslationX/Y for Workspace Items unconditional
issue 149438360
test: manual
Change-Id: Ic3fde172f669e215cd25db0fcd4e1c3c873d314f
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)
Test: manual
Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
* Introduce FolderNameInfo class for passing down the folder name
suggestions from FolderNameProvider.
* Use FolderNameInfo for storing the serialized suggested names for
Folders. It is parsed and used in FolderEdit.
Bug: 148417030
Bug: 148916551
Bug: 148432151
Change-Id: Idaa81e203cc42889be15d0845230b4508521041c
With this change, we can also render folders in preview. It's built on top of part 1.
Test: Go to grid options, choose a different grid option, and see user's workspace rendered in the preview
Bug: 144052839
Change-Id: Iaf6d8af6b909ece4147ea250d95dec3d2c0019d3
FolderIcon#mDotInfo is stored per instance, but not kept up to date
when re-binding on rotation.
Bug: 144369875
Change-Id: Ia429e4b4039eb02fb4587f54e33a0717408e4ac2
Folders are bound before they are opened and unbound on close. This
allows us to recycle the views in folders
Bug: 139051851
Change-Id: Ic1ed3265c0f583af54d73dab6f2751bc95266ea9
- For app open, the icon text remains where it is and only the icon moves.
- Similarly for app close, the icon text remains where it is and fades in
with the rest of the other icons text.
- With this change, the original view is always "VISIBLE"
(if BubbleTextView/FolderIcon) but we hide certain elements.
Added video to bug.
Bug: 137200188
Bug: 139885365
Change-Id: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
Merged-In: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind
Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
- Calculate point on icon path nearest to top right corner, and
use that as center for the dot
- Cleanup code related to dot offset
Test:
Set each style (different icon shape) and verify dot is in correct
placement for each of:
- Folders
- Icons in folders
- Icons in all apps
- Icons on workspace
Bug: 124414511
Change-Id: I036ed3677e8af222f00d4fad4a36a7e4d9b49ad9
Workspace and hotseat are drawn in rotated UI giving the impression that the
device is in Portrait, even though it is in landscape
Bug: 131360075
Change-Id: I29c4068af25fd4dcf7039b9a45886e864a137977
Otherwise the returned position could be empty, leading to the crash
in the bug (for example).
Bug: 129474866
Change-Id: I0d300d8022b50f83221a84c09a59b597bfa291dc
* Added a cross fade at the end for text and shadows.
* Animate in FolderIcon bg/dot/text after swapping.
Bug: 129297366
Change-Id: Ieeb5d7b8fb389a2f7ee263d38b3021ffdefefd93