summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/dragndrop/DragLayer.java
Commit message (Collapse)AuthorAgeFilesLines
* Applying the widget resize changes even when the activity is destroyedSunny Goyal2017-08-231-1/+0
| | | | | | | in the middle of the resize interaction. Bug: 64759853 Change-Id: I65ab7df0426f36fe1121bf055e38fc722822b0f4
* Remove LAUNCHER3_ALL_APPS_PULL_UPHyunyoung Song2017-08-211-1/+1
| | | | | | | | Bug: 63712253 Verified: all apps transition fully functional Verified: NO_ALL_APPS_ICON = false case also works. Change-Id: I779fb7bd4927c5923da3f85590d912dbbbcdef4d
* Use extracted color for scrim in overview mode.Mario Bertschler2017-06-081-4/+8
| | | | Change-Id: Ia24dbf69a64cb0b84da9985a5dd78ca699e7bed1
* Dark color on super light wallpaper supportMario Bertschler2017-06-071-1/+3
| | | | Change-Id: I0fdfa9abefb72e06c45b1f635ac97e2acfa97f05
* Remove background scrim when there are no top insets.Jon Miranda2017-05-011-0/+6
| | | | | | | | | ie. In portrait multiwindow mode, the launcher is always on the bottom so we can remove the background scrim that is meant to protect the status bar contents. Bug: 36397512 Change-Id: Ie9655b0604b5bebafdfb4153b370bb655129051c
* Rename WidgetsAndMore to WidgetsBottomSheetTony Wickham2017-04-171-5/+4
| | | | | | | (It only contains widgets now.) Bug: 35766387 Change-Id: I5864791a9741d1c56ac6df30125fe7a4a677b4bd
* Add WidgetsAndMore bottom sheetTony Wickham2017-03-301-0/+7
| | | | | | | | | | | - Contains two rows, one for widgets, and one for "configurable shortcuts" that have customization activities - Extends AbstractFloatingView and uses VerticalPullDetector for touch interactions - No way to show this currently; will add options to popup in followup Bug: 34940468 Change-Id: Iab62c2cb89428f91119c9c86f9db886496c321fd
* Add basic logs for tap outside action.Jon Miranda2017-02-071-0/+4
| | | | Change-Id: I6288610b9870c3abe88794c53309b1d76dd2780f
* Updating the preview generation logic so that it aligns better withSunny Goyal2017-01-271-8/+4
| | | | | | | | | | | | 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
* Adding support for drag and drop for requestPinItem.Sunny Goyal2017-01-241-53/+0
| | | | | | | | | | | | | | | | | | | | On long pressing, the confirmation activity starts a system drag-n-drop and focuses the launcher activity. We then drive the launcher drag controller using the system drag event Caveats: > We use a transparent preview for system drag and drop and use a view inside launcher for actual preview. This gives us better control over various animations. > The parameters for drag operation are passed to the Launcher activity using the intent. Since onNewIntent and onDragEvent come at different times and are not associated, a random uuid is used as mime-type to match the drag event with intent params > If the workspace is locked (eg, loader is running) the drag operation is simply dropped. Will be imporved in follow up cls Bug: 33584624 Change-Id: I0bb5b25b690f86b6af31a14e11beb669fcb3a281
* Fix clipping of drag outline by increasing padding.Jon Miranda2016-12-201-1/+1
| | | | | | | Low resolution will be addressed in future CL. Bug: 31915722 Change-Id: I6bdd32b7a30819fde1f15473a63ac280029b6715
* Removing FeatureFlag.LAUNCHER3_LEGACY_WORKSPACE_DND and corresponding logicSunny Goyal2016-12-151-74/+1
| | | | Change-Id: Ie10c087b4f72ee27be5bf12e2c81be5b7a3a6176
* Merge "Simplifying mapCoordInSelfToDescendant" into ub-launcher3-masterSunny Goyal2016-11-071-2/+2
|\
| * Simplifying mapCoordInSelfToDescendantSunny Goyal2016-10-281-2/+2
| | | | | | | | | | | | | | > Removing new object creation (during draw and touch handling) > Simplifying matrix operation to call invert only once at the end Change-Id: Iffadd6e9d84997baa36719ed688a7c3c1027e839
* | Updating version check method namesSunny Goyal2016-11-021-1/+1
|/ | | | Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
* Removing some bitmap drawables.Sunny Goyal2016-10-181-4/+6
| | | | | | Loading the edge drawables only when legacy DND is enabled Change-Id: I1c66d03146fb7fa7d61a4abf8c2e5a4289a117b9
* Merge "Refactoring floating view opening/closing logic" into ub-launcher3-masterSunny Goyal2016-10-101-44/+22
|\
| * Refactoring floating view opening/closing logicSunny Goyal2016-10-101-44/+22
| | | | | | | | | | | | | | | | | | > Creating a base view for floating panels with some common methods > Moving the getOpen method to individual classes > Moving the folder icon animation logic to folder icon > Moving all the logic related for opening folder to Folder class Change-Id: I898dfb6870b857cb921d2729b89618bc43ff2e88
* | Refactoring AppWidgetResizeFrameSunny Goyal2016-10-071-5/+6
|/ | | | | | | > Defining the layout in xml > Simplifying the touch handling calculations Change-Id: Iccfd82161d1e678d77ad6ff63f76e04ad905f9d8
* Code sanitizationHyunyoung Song2016-10-061-1/+1
| | | | | | - Removed bad method/class name typos Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
* Update pre-drag lifecycle for apps with shortcuts.Tony Wickham2016-10-041-1/+1
| | | | | | | | | | | | | | | | - First of all, deferred drag has been renamed to pre-drag to avoid confusion with the existing deferred end drag. - For normal drags, the cycle is still startDrag --> onDragStart --> onDrop --> onDropComplete --> onDragEnd. - Pre-drags have two additional callbacks: onPreDragStart and onPreDragEnd. onPreDragStart is called between startDrag and onDragStart, and onPreDragEnd is called at the same time as onDragStart or onDragEnd. - If the pre-drag has not transitioned to a full drag before onDragEnd, onDragStart and onDropComplete are skipped (onDrop is still called to allow the DragView to animate). Change-Id: Icd7a8f75d5fcc159f9a52758c22ab6eae3edb9e2
* Resize only one widget at a timeSunny Goyal2016-09-231-69/+22
| | | | | | | | | | > Removing logic to have multiple widgets in resize mode > Making ResizeFrame a touch controller, so that it fits well with other touch interaction in drag layer > Chaning the method names in touch controller, so that it do not overlaps with the default View methods Change-Id: I85d4dbdfc82d078781adbce137dfaaea59c9c83d
* Adding support for multiwindow drag and dropSunny Goyal2016-09-121-4/+57
| | | | Change-Id: I95b46e3c3f1238307d3ef5a6c81a8e530ba0987a
* Add outline to shortcuts when focused.Tony Wickham2016-09-071-1/+3
| | | | | Bug: 30563273 Change-Id: Ia54c112dcf91c225588b7388001eb93ee5c03171
* Fixing topView not being considered in all places when calculating accessibleSunny Goyal2016-09-021-34/+37
| | | | | | | and focusable views Bug: 30563273 Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
* Moving the scrim to draglayerSunny Goyal2016-08-231-25/+0
| | | | | | | | | | | > This causes the scrim to animate with the content on first launch > Also removing the logic to disable scrim based on state. That logic was only executing onResume which could lead to an invalid state Bug: 30972956 Bug: 30576826 Change-Id: Ia8386b303ce260f69e3b3b93041226f409301a01
* Pull down should work on search box, even if all apps scroll is not at top.Hyunyoung Song2016-08-051-1/+1
| | | | | | b/30295305 Change-Id: I38bbe47d6e33929c550930c9f157c58fbea203ef
* Reset mActiveController to null in DragLayer.onInterceptTouchEvent().Tony Wickham2016-08-041-0/+2
| | | | | | | | | | | Otherwise the previous active controller will continue to handle touch events even if it doesn't re-intercept future touches. For instance, All Apps was handling the swipe gesture after DragLayer intercepted to close a shortcuts container, which led to the weird behavior described in the bug. Bug: 30590854 Change-Id: I247b39b03d336a04659f6ce644380bf3cef8de3f
* Disabling accessibility focus on all children when shortcuts is openSunny Goyal2016-08-031-11/+21
| | | | | Bug: 30611791 Change-Id: Ibb1dec13b62add3799c215fea98e87e3fa89638d
* Animate discovery bounce for all apps pull up interactionHyunyoung Song2016-07-211-0/+4
| | | | | | | | | | | b/30221381 > Will not support landscape case. If the user knows how to enable rotation, it's very unlikely they don't know how to bring up apps drawer > If unlocked using finger unlock immediately after screen is turned off, bounce is not shown due to delay in ACTION_SCREEN_OFF broadcast Change-Id: Ia8b7e572eaa4aeab8b1add1e5660fee3a63ba21c
* Merge "Moving the QSB out of the cell layout to the Drag layer" into ↵Sunny Goyal2016-07-141-9/+5
|\ | | | | | | ub-launcher3-calgary
| * Moving the QSB out of the cell layout to the Drag layerSunny Goyal2016-07-131-9/+5
| | | | | | | | | | | | | | | | This allows better edge matching for the QSB. The QSB position is kept synchronized with the page scroll and all-apps transition. But its not visible in spring loaded and overview mode Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
* | Close the shortcuts container in various places.Tony Wickham2016-07-131-7/+2
|/ | | | | | | | | | | | | | - Mostly everywhere folders are closed - Implements DragListener so we can close the container when dragging the original icon or shortcuts from the container. We actually just hide the container in onDragStart() and really remove it in onDragEnd(). This avoids interfering with touch events and thus allows us to remove the hack of explicitly setting the DragLayer's controller when dragging shortcuts (since it will do it on intercept). Bug: 30080537 Change-Id: Iccc2afba2a990a613bc588d57c4d8c1b7c65224b
* Fix some issues with shortcut containers opened inside folders.Tony Wickham2016-06-301-19/+22
| | | | | | | | | | | | | - Dragging a shortcut from a container inside a folder was buggy because the folder assumes that all drags are removing an item (so it marks the cell as unoccupied, etc.). So we just close the folder when dragging a shortcut. - When the shortcuts container opened outside of a folder, touches on it were incercepted by DragLayer to close the folder. So we move the container intercept check first, and return false if the touch is over the container so it can handle the touch. Change-Id: I8c5814513e99910b2930e05d9a62dfe0a0a60f3e
* Long-press on an app to reveal its shortcuts.Tony Wickham2016-06-291-12/+34
| | | | | | | | | | | | | | | - 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
* Extend all apps pull up activation area to page indicator viewHyunyoung Song2016-06-271-0/+5
| | | | | | | b/29752599 Change-Id: I3ee5efefa98defbc8f386895753946efe79708b4 Background: page indicator's background is where the caret symbol is.
* Moving LauncherAccessibilityDelegate to Launcher to associate it withSunny Goyal2016-06-171-3/+1
| | | | | | activity lifecycle. Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
* UI fixes to All apps pull up workHyunyoung Song2016-06-151-0/+5
| | | | | | | | | | | | | | | | | b/28917826 - nav bar change to light when top of the all apps container passes y mid point of the status bar - apps search edit box change when top of the all apps passes the bottom of nav bar - Restrict pull up to work only if the ACTION_DOWN event started from the hotseat. - Landscape: reverted old padding and margin. Only the interaction is different. - Tuning of the motion spec - Animation duration respects fling speed more agressively. - and many more small bugs... Change-Id: Icde4093c41eeab8c9c6d9dc8b7d57adc3b171349
* Fixing bug in getDescendantCoordRelativeToParent where it wasSunny Goyal2016-06-141-3/+1
| | | | | | | | | calculating the coordinates relative to the root's parent The bug went unnoticed for so long, as its only used in DragLayer which is positioned at 0,0 in its parent Change-Id: I101cda1f1fa919c0faf9b23b1eeb05764bdf1a40
* Unifying focus indicator handling for workspace and all-appsSunny Goyal2016-06-081-0/+9
| | | | | | | Adding an abstract FocusIndicatorHelper based on FocusIndicatorView which draws the background instead of using a dummy view. Change-Id: Id560195323d2ddad8fcd77ba675cf3f4fd4a94ab
* Merge "Allowing the first screen to expand to the screen edge" into ↵Sunny Goyal2016-06-071-1/+6
|\ | | | | | | ub-launcher3-calgary
| * Allowing the first screen to expand to the screen edgeSunny Goyal2016-06-061-1/+6
| | | | | | | | | | This allows the QSB to extend all the way to the edge Change-Id: I43c6e21e44fef7fffe6fb12b7afb95549b68679f
* | Merge "Removing the SearchDropTarget bar as it no longer contains the QSB" ↵Sunny Goyal2016-06-071-23/+7
|\ \ | | | | | | | | | into ub-launcher3-calgary
| * | Removing the SearchDropTarget bar as it no longer contains the QSBSunny Goyal2016-06-061-23/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 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
* | | Guard all apps pull up work behind the flagHyunyoung Song2016-06-061-1/+1
|/ / | | | | | | | | | | b/28917826 Change-Id: Ic001d820bad777d90c6bdcd1a17b6961e38769be
* / Pull up all apps interactionHyunyoung Song2016-06-061-9/+29
|/ | | | | | | | | | | | First phase implementation: dragging and animation interaction is implemented namely in two classes. ScrollGestureDetector and AllAppsTransitionController. FeatureFlag.LAUNCHER#_ALL_APPS_PULL_UP will be true for only AOSP and not in the extending builds. This way, we can safely iterate without turning it on the shipped ready version. b/28917826 Change-Id: I0501309c0121880ffe0555f82d6ac5a145581bb1
* Disable pinch gesture when accessibility is enabled.Tony Wickham2016-04-061-4/+9
| | | | | Bug: 27676309 Change-Id: Iba0f04693c494f258ef21d740ee933f9c32a7674
* Add FeatureFlags.LAUNCHER3_DISABLE_PINCH_TO_OVERVIEWTony Wickham2016-03-231-4/+9
| | | | | Bug: 27796974 Change-Id: Icda33fb62783cc3f7b510d627d1eeb9cf29bd2d3
* Don't listen for the pinch gesture if the workspace is locked.Tony Wickham2016-03-161-6/+3
| | | | | Bug: 27639653 Change-Id: I1f3b324a4b95cc5deaa2513dcbf4ed5a158a4866
* Remove scrim on highlighted spring-loaded panel.Tony Wickham2016-03-161-0/+20
| | | | | Bug: 27135377 Change-Id: I470955ed082a45ae7dc5f8fdd1f3decb2b573dbc