Fix bug 2261637 - Workspace previews home screens on long pressing

at the bottom of app drawer

This includes some contortions to get it not to perform the vibrate
haptic feedback then.

(By the way, it appears that we're vibrating on the add context menu
long press, so also do it when when we show the previews.
This commit is contained in:
Joe Onorato committed 2009-11-16 18:20:51 -08:00
1 parent 5612e4321e
commit 0d44e9482b
2 files changed
+19 -5

No files matched your search

+4 -3
View File
@@ -139,6 +139,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
mDefaultScreen = a.getInt(R.styleable.Workspace_defaultScreen, 1);
a.recycle();
setHapticFeedbackEnabled(false);
initWorkspace();
}
@@ -352,6 +353,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
}
group.addView(child, insert ? 0 : -1, lp);
if (!(child instanceof Folder)) {
child.setHapticFeedbackEnabled(false);
child.setOnLongClickListener(mLongClickListener);
}
if (child instanceof DropTarget) {
@@ -426,10 +428,8 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
if (vacant) {
group.addView(child,
new CellLayout.LayoutParams(mTempCell[0], mTempCell[1], spanX, spanY));
child.setHapticFeedbackEnabled(false);
child.setOnLongClickListener(mLongClickListener);
if (!(child instanceof Folder)) {
child.setOnLongClickListener(mLongClickListener);
}
if (child instanceof DropTarget) {
mDragController.addDropTarget((DropTarget)child);
}
@@ -1094,6 +1094,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
}
cellLayout.addView(view, insertAtFirst ? 0 : -1);
view.setHapticFeedbackEnabled(false);
view.setOnLongClickListener(mLongClickListener);
if (view instanceof DropTarget) {
mDragController.addDropTarget((DropTarget) view);