summaryrefslogtreecommitdiffstats
path: root/res/values/dimens.xml
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-09-19 14:06:31 -0700
committerTony <twickham@google.com>2016-09-23 18:44:47 -0700
commit6e74e899d314663415f54895227bb79a51fd734b (patch)
tree184d41b9090fae07da4fb10c44f9d2a976144345 /res/values/dimens.xml
parent00341907b7326fbdc4c2a39e8b6cda16b7074daf (diff)
downloadandroid_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/dimens.xml')
-rw-r--r--res/values/dimens.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 33466a813..367cee48a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -164,7 +164,7 @@
<dimen name="bg_pill_height">48dp</dimen>
<dimen name="bg_pill_radius">24dp</dimen>
<dimen name="deep_shortcuts_spacing">4dp</dimen>
- <dimen name="deep_shortcuts_drag_view_scale">6dp</dimen>
+ <dimen name="deferred_drag_view_scale">6dp</dimen>
<!-- an icon with shortcuts must be dragged this far before the container is removed. -->
<dimen name="deep_shortcuts_start_drag_threshold">16dp</dimen>
<dimen name="deep_shortcut_icon_size">36dp</dimen>