Loading src/com/android/settings/cyanogenmod/TouchInterceptor.java +8 −4 Original line number Diff line number Diff line Loading @@ -86,13 +86,17 @@ public class TouchInterceptor extends ListView { // The dragger icon itself is quite small, so pretend the // touch area is bigger if (x < r.right * 2) { // Fix x position while dragging int[] itemPos = new int[2]; item.getLocationOnScreen(itemPos); item.setDrawingCacheEnabled(true); // Create a copy of the drawing cache so that it does // not get recycled // by the framework when the list tries to clean up // memory Bitmap bitmap = Bitmap.createBitmap(item.getDrawingCache()); startDragging(bitmap, y); startDragging(bitmap, itemPos[0], y); mDragPos = itemnum; mFirstDragPos = mDragPos; mHeight = getHeight(); Loading Loading @@ -292,12 +296,12 @@ public class TouchInterceptor extends ListView { return super.onTouchEvent(ev); } private void startDragging(Bitmap bm, int y) { private void startDragging(Bitmap bm, int x, int y) { stopDragging(); mWindowParams = new WindowManager.LayoutParams(); mWindowParams.gravity = Gravity.TOP; mWindowParams.x = 0; mWindowParams.gravity = Gravity.TOP | Gravity.LEFT; mWindowParams.x = x; mWindowParams.y = y - mDragPoint + mCoordOffset; mWindowParams.height = WindowManager.LayoutParams.WRAP_CONTENT; Loading Loading
src/com/android/settings/cyanogenmod/TouchInterceptor.java +8 −4 Original line number Diff line number Diff line Loading @@ -86,13 +86,17 @@ public class TouchInterceptor extends ListView { // The dragger icon itself is quite small, so pretend the // touch area is bigger if (x < r.right * 2) { // Fix x position while dragging int[] itemPos = new int[2]; item.getLocationOnScreen(itemPos); item.setDrawingCacheEnabled(true); // Create a copy of the drawing cache so that it does // not get recycled // by the framework when the list tries to clean up // memory Bitmap bitmap = Bitmap.createBitmap(item.getDrawingCache()); startDragging(bitmap, y); startDragging(bitmap, itemPos[0], y); mDragPos = itemnum; mFirstDragPos = mDragPos; mHeight = getHeight(); Loading Loading @@ -292,12 +296,12 @@ public class TouchInterceptor extends ListView { return super.onTouchEvent(ev); } private void startDragging(Bitmap bm, int y) { private void startDragging(Bitmap bm, int x, int y) { stopDragging(); mWindowParams = new WindowManager.LayoutParams(); mWindowParams.gravity = Gravity.TOP; mWindowParams.x = 0; mWindowParams.gravity = Gravity.TOP | Gravity.LEFT; mWindowParams.x = x; mWindowParams.y = y - mDragPoint + mCoordOffset; mWindowParams.height = WindowManager.LayoutParams.WRAP_CONTENT; Loading