Minor fixes to Launcher

- Tweaking the AllApps tab padding
- Fixing issue where the cling punch out might be in the wrong location
- Removing unused dragging code related to drop/scroll area overlap
- Tweaking padding so that picking up an icon on the top row does not automatically hover over delete (Bug 5636264)
- Fixing issue where multiple bgs in AllApps tab bar line makes it look blurry (Bug 5523822)

Change-Id: I707397c231188a9feee8c0856374e0483cf37296
This commit is contained in:
Winson Chung
2011-11-17 14:58:51 -08:00
parent b0736fac73
commit 3f4e142380
11 changed files with 64 additions and 49 deletions
+2 -18
View File
@@ -101,7 +101,6 @@ public class DragController {
private int mScrollState = SCROLL_OUTSIDE_ZONE;
private ScrollRunnable mScrollRunnable = new ScrollRunnable();
private RectF mDeleteRegion;
private DropTarget mLastDropTarget;
private InputMethodManager mInputMethodManager;
@@ -486,12 +485,6 @@ public class DragController {
}
mLastDropTarget = dropTarget;
// Scroll, maybe, but not if we're in the delete region.
boolean inDeleteRegion = false;
if (mDeleteRegion != null) {
inDeleteRegion = mDeleteRegion.contains(x, y);
}
// After a scroll, the touch point will still be in the scroll region.
// Rather than scrolling immediately, require a bit of twiddling to scroll again
final int slop = ViewConfiguration.get(mLauncher).getScaledWindowTouchSlop();
@@ -500,7 +493,7 @@ public class DragController {
mLastTouch[0] = x;
mLastTouch[1] = y;
if (!inDeleteRegion && x < mScrollZone) {
if (x < mScrollZone) {
if (mScrollState == SCROLL_OUTSIDE_ZONE && mDistanceSinceScroll > slop) {
mScrollState = SCROLL_WAITING_IN_ZONE;
if (mDragScroller.onEnterScrollArea(x, y, SCROLL_LEFT)) {
@@ -508,7 +501,7 @@ public class DragController {
mHandler.postDelayed(mScrollRunnable, SCROLL_DELAY);
}
}
} else if (!inDeleteRegion && x > mScrollView.getWidth() - mScrollZone) {
} else if (x > mScrollView.getWidth() - mScrollZone) {
if (mScrollState == SCROLL_OUTSIDE_ZONE && mDistanceSinceScroll > slop) {
mScrollState = SCROLL_WAITING_IN_ZONE;
if (mDragScroller.onEnterScrollArea(x, y, SCROLL_RIGHT)) {
@@ -669,15 +662,6 @@ public class DragController {
mScrollView = v;
}
/**
* Specifies the delete region. We won't scroll on touch events over the delete region.
*
* @param region The rectangle in DragLayer coordinates of the delete region.
*/
void setDeleteRegion(RectF region) {
mDeleteRegion = region;
}
DragView getDragView() {
return mDragObject.dragView;
}