summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ButtonDropTarget.java
Commit message (Collapse)AuthorAgeFilesLines
* Removing various reflection based animations, to allow for better proguardingSunny Goyal2018-09-211-1/+16
| | | | Change-Id: If9df24ea4170e8a3d336057d1c3dc800934fc1ac
* Add undo snackbar for deleting itemsTony Wickham2018-08-301-0/+4
| | | | | | | | | | | - Add methods to ModelWriter to prepareForUndoDelete, then enqueueDeleteRunnable, followed by commitDelete or abortDelete. - Add Snackbar floating view - Show Undo snackbar when dropping or flinging to delete target; if the undo action is clicked, we abort the delete, otherwise we commit it. Bug: 24238108 Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
* Refactors ButtonDropTarget to add extension dataMehdi Alizadeh2018-05-021-1/+2
| | | | | | | | | Also fixes a bug where DeleteDropTarget was logging Remove instead of Cancel. Bug: 78793340 Test: Enable verbose logging and manual test Change-Id: I0f0cfff070eab003ebb745292630bc6ce3243f4d
* Fixes the incorrect hover icon color in drop bar when dark themeMehdi Alizadeh2018-04-301-2/+4
| | | | | | Bug: 78641863 Test: Manual test with dark and light wallpapers Change-Id: Ic3fb68f5c5f746482a7f23b11284e30ac3e10168
* Revert "Revert "Adding support for hiding widgets from the widget tray and ↵Winson Chung2018-03-051-3/+9
| | | | | | | | | | reconfiguring widgets"" This reverts commit f502e5faecbd460ad3b8258168c5812cbaa34c4e. Reason for revert: Reverting post-build Change-Id: I09eb292dbbbe37ffaf3abc477aa2ddb5700093b8
* Revert "Adding support for hiding widgets from the widget tray and ↵Winson Chung2018-03-051-9/+3
| | | | | | | | | | reconfiguring widgets" This reverts commit b29a5fa55ce3b84dd1829688db8522d5e68ffc44. Reason for revert: Temporary revert for build. Change-Id: I58045ad1ce28d398a5216ba4fbbcdba1196942ec
* Adding support for hiding widgets from the widget tray and reconfiguring widgetsSunny Goyal2018-03-021-3/+9
| | | | | | | | > Removing AppInfo target > Switching between uninstall and setup based on the drag view Bug: 63931362 Change-Id: Iccd6f965fa3d61992244a365efc242122292c0ca
* Fix bug where Cancel/Remove drop target text was not being updated.Jon Miranda2018-02-061-2/+3
| | | | | Bug: 72644671 Change-Id: I8a042230b1a61b6ccd8a9c53bc09177f065351b0
* Using same layout for drop-target bar in landscape and portraitSunny Goyal2018-01-191-44/+76
| | | | | | | > Adding a tooltip on drag over when the text is not visible Bug: 71709920 Change-Id: I1897a8dacd191fb1aeaec37f5d5c73c49517192a
* Simplifying workspace layoutSunny Goyal2017-11-131-3/+4
| | | | | | | | | 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
* Consolidating various interpolatorsSunny Goyal2017-10-261-4/+2
| | | | Change-Id: I9588eee3552001b162a1e8d5ccefcfb44d221880
* Merge "Caching the uninstall disabled state for each userHandle" into ↵Sunny Goyal2017-10-261-0/+8
|\ | | | | | | ub-launcher3-master
| * Caching the uninstall disabled state for each userHandleSunny Goyal2017-10-241-0/+8
| | | | | | | | | | | | | | | | > Removing static access to varios drop targets > Creating a cache at UI level with 5sec timeout Bug: 67104426 Change-Id: Ide6e2e0c01606f9b5fb9281f95dc009873c18fb9
* | Exposing the state manager directly instead of providing various helper ↵Sunny Goyal2017-10-251-2/+2
|/ | | | | | | methods for state change Bug: 67678570 Change-Id: If3d05c804c034ffa5e403da8eaa23e85e373c863
* Launcher state management cleanupSunny Goyal2017-10-171-1/+3
| | | | | | | | | | > 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
* Cleaning up drag state management.Sunny Goyal2017-10-161-1/+1
| | | | | | | | | 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
* Merging duplicate logic for deferred drop handling in Worksace and FolderSunny Goyal2017-10-061-1/+1
| | | | | | | | > All the logic is contained in UninstallDropTarget > Also fixing a bug were mWaitingForResume was not cleared Bug: 34692289 Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
* Removing some methods from the DragSourceSunny Goyal2017-10-031-3/+3
| | | | | | | This makes is easier to create new DragSource and sets up proper default values in DragOptions Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
* Hides text on ButtonDropTargets if any of them are ellipsized.Jon Miranda2017-08-241-0/+29
| | | | | | | | | This can happen on small devices or on devices where Font/Display size is enlarged and when Developer Options is turned on when all three options {Uninstall, Delete, App Info} are shown at once. Bug: 64391860 Change-Id: If355d28087d53148114eb586efb3c26f158b3713
* Fixing dark tint for ShadowDrawable.Sunny Goyal2017-06-201-2/+2
| | | | | | Updating the dark theme for empty all-apps search drawable. Change-Id: Ieb2018924da337bdd97eaf3adf2d32c3e3bebc73
* Add shadow to badgesTony Wickham2017-03-011-2/+3
| | | | | | | | | | - Add static method to ShadowGenerator to generate a circle Bitmap with a shadow. - Move setColorScale() from DragView to Themes, and use it to apply color to the shadowed Bitmap. Bug: 35744066 Change-Id: I8d1da528bbf94dc83851f0b4016361ed9f8d5349
* Updating the preview generation logic so that it aligns better withSunny Goyal2017-01-271-1/+1
| | | | | | | | | | | | the drag source image > Using common code for pending item drag (WidgetContainerView and PinItemDragListener) > Adding a shortcut-circuit in Workspace when a pendingItem can create a shortcut directly. Previously the multi-window drop was routing through onActivityResult which was causing some state information to be lost. Bug: 33584624 Change-Id: I0259870032185713caa9bff27092dbae6ce91199
* Removing all compatibility code below LollipopSunny Goyal2016-12-161-26/+3
| | | | | Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
* Refactoring FlingToDeleteSunny Goyal2016-12-131-10/+7
| | | | | | | | | | > Moving all fling related logic to FlingToDeleteHelper from DragController > Removing fling related methods from DragSource and DropTarget > Moving fling animation logic from DeleteDropTarget to FlingAnimation > Simplifying DropTargetBar to directly look for all valid drop targets. This makes it easier to add new DropTarget in xml. Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
* Use Launcher.getLauncher(Context) instead of type-casting.Tony2016-10-071-1/+1
| | | | | Bug: 32010039 Change-Id: Icb80d3e547a706740b84df2cb80f99e4a7f81c43
* Adding support for multiwindow drag and dropSunny Goyal2016-09-121-1/+2
| | | | Change-Id: I95b46e3c3f1238307d3ef5a6c81a8e530ba0987a
* Some drag and drop code refactor:Sunny Goyal2016-09-011-7/+7
| | | | | | | | | 1) Adding DragOptions to easily extend drap functionality 2) Changing onDragStarted signature to send more information 3) Updating states for dropTargetButton based on drag event directly 4) Removing folder item based on onDragStarted and not startDrag Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
* Fixing broken accessibility dragSunny Goyal2016-08-171-2/+5
| | | | | | | | | | > Allow touch events on hotseat while in accessible drag as drag now happens in spring loaded state. > Allow drop target buttons to ignore thershold check when in accessibility drag Bug: 30900444 Change-Id: I88274367983fc027b2ddde3a719ca943f4f48587
* Moving LauncherAccessibilityDelegate to Launcher to associate it withSunny Goyal2016-06-171-2/+1
| | | | | | activity lifecycle. Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
* Removing the SearchDropTarget bar as it no longer contains the QSBSunny Goyal2016-06-061-7/+5
| | | | | | | | | | | | > 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
* Add distance threshold for dragged items before accepted by targets.Tony Wickham2016-03-291-3/+8
| | | | | | | | | With the new spring-loaded workspace, items are often very close to button drop targets (e.g. App Info) at the start of a drag. This threshold makes it less likely to accidentally drop on a target. Bug: 24099531 Change-Id: I4912ceeb0b63958816177c7bde073e825176d987
* Defining separate layouts for horizontal and vertical drop target barsSunny Goyal2016-03-241-10/+11
| | | | | | | instead of chaning the layouts in DeviceProfile Bug: 27721989 Change-Id: I9a22c21e643f4fd0058c9be5e9d705aaf7649204
* Refactoring WallpaperOffsetInterpolator to a new fileSunny Goyal2015-10-161-5/+0
| | | | | | Removing some us unused methods Change-Id: Ife790e5ca6848fa13dc3fab1bba1e6220bf83743
* Added 'Cancel' drop target from all apps and widget picker.Tony Wickham2015-10-051-3/+5
| | | | | | | | | | - Reuse DeleteDropTarget since it's the same effect, but with "Cancel" instead of "Remove" if supportsDeleteDropTarget() returns false. - Rename related strings (but not their values) Bug: 24104015 Bug: 24099531 Change-Id: Ia9fbcaa17bb17f7aa31df1f830298da01544c178
* am 9ccacb54: Merge "Fixing \'Item removed\' announced twice when using ↵Sunny Goyal2015-10-011-5/+1
|\ | | | | | | | | | | | | accessible DnD" into ub-launcher3-burnaby-polish * commit '9ccacb544bfcb6b444edf09b1b37f955ae57168c': Fixing 'Item removed' announced twice when using accessible DnD
| * Merge "Fixing 'Item removed' announced twice when using accessible DnD" into ↵Sunny Goyal2015-10-011-5/+1
| |\ | | | | | | | | | ub-launcher3-burnaby-polish
| | * Fixing 'Item removed' announced twice when using accessible DnDSunny Goyal2015-09-251-5/+1
| | | | | | | | | | | | Change-Id: I2d8781155619d22a41c3f363be7909d411c62fa9
* | | am d21301e6: Cancelling the stateannouncer when entering button drop targetSunny Goyal2015-09-251-0/+3
|\| | | | | | | | | | | | | | * commit 'd21301e674377ecd72bd14f32b52c68fabcfd3be': Cancelling the stateannouncer when entering button drop target
| * | Cancelling the stateannouncer when entering button drop targetSunny Goyal2015-09-251-0/+3
| |/ | | | | | | Change-Id: Ia10298e1d4862fc5f46894fa6d934207d6e9c117
* | resolved conflicts for e78e3d73 to ub-launcher3-masterSunny Goyal2015-09-251-0/+2
|\| | | | | | | Change-Id: Idc119a57e21cf6016ee0fd91866839301db072d6
| * Accessibility fixesSunny Goyal2015-09-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | 1) Use a different content description for temporary new page 2) Use different accessibility description for add widget toast 3) Announce when an item is deleted 4) Announce when hovering over a drop target 5) Announce state during drag-n-drop and widget resize (similar to seekbar) Bug: 23573321, 24057944 Change-Id: Icabb317625e70c78e11c0b4f99b9339172d93594
* | Added BaseDropTargetBar, which SearchDropTargetBar extends.Tony Wickham2015-09-151-6/+6
| | | | | | | | | | | | This is to allow for a future AppInfoDropTargetBar. Change-Id: I5e66129919226eaef1ba1ddb0c0c99d0a6dc48df
* | Moving drag-drop related code into a separate package.Vadim Tryshev2015-08-201-0/+3
| | | | | | | | | | | | | | | | | | This is per an earlier CR comment "we should probably move all this code to its own package (launcher3.dragndrop) in a separate cl". I'm not moving DragSource because it's referred from gsa code. Bug: 22609426 Change-Id: Ia7204dab99c0c395c66b77143a2d60411153f5f3
* | resolved conflicts for merge of 9fc953b9 to ub-launcher3-masterSunny Goyal2015-08-171-4/+4
|\| | | | | | | Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
| * Version code cleanupSunny Goyal2015-08-171-5/+4
| | | | | | | | | | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* | Refactoring ItemInfoSunny Goyal2015-06-301-4/+3
|/ | | | | | | | > Changing dragObject to ItemInfo > Removing dropPos which is always null > Removing requiresDbUpdate which is only used in CellLayout Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
* Ensure that we use the system long press duration when dragging from AllApps.Winson Chung2015-06-051-6/+3
| | | | | | | - Removing some old code out of LauncherAppState Bug: 21559400 Change-Id: I3c586094efb7ad8a17d2169bc8aaccf6b0df40a2
* Removing some synthetic method creationSunny Goyal2015-06-021-1/+1
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Using color filter when animating the drop target instead to TransitionDrawableSunny Goyal2015-05-211-13/+46
| | | | | | | > No more flickering when crossfading between two bitmaps in small duration > Allows us to control the color directly without depending on the assets Change-Id: Ie7ed8bb94baf560e9b939cca624ed1bad457732c
* Setting drawable to droptarget in the code to avoid multiple drawable inflationSunny Goyal2015-05-201-25/+8
| | | | Change-Id: Ib713b3051e2707d46a4ee0090aed2db1d2e641b9