diff options
author | Tony Wickham <twickham@google.com> | 2016-09-19 14:06:31 -0700 |
---|---|---|
committer | Tony <twickham@google.com> | 2016-09-23 18:44:47 -0700 |
commit | 6e74e899d314663415f54895227bb79a51fd734b (patch) | |
tree | 184d41b9090fae07da4fb10c44f9d2a976144345 /res/values-kk-rKZ | |
parent | 00341907b7326fbdc4c2a39e8b6cda16b7074daf (diff) | |
download | android_packages_apps_Trebuchet-6e74e899d314663415f54895227bb79a51fd734b.tar.gz android_packages_apps_Trebuchet-6e74e899d314663415f54895227bb79a51fd734b.tar.bz2 android_packages_apps_Trebuchet-6e74e899d314663415f54895227bb79a51fd734b.zip |
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
Diffstat (limited to 'res/values-kk-rKZ')
0 files changed, 0 insertions, 0 deletions