Widget resizing can now displace items

Change-Id: I005c9aebf64b2d01debe59f86a208075d19476ea
This commit is contained in:
Adam Cohen
2012-04-11 18:06:28 -07:00
parent c6cc61d458
commit bebf042666
5 changed files with 136 additions and 104 deletions
+3 -1
View File
@@ -242,7 +242,8 @@ public class DragLayer extends FrameLayout {
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
mCurrentResizeFrame.commitResizeForDelta(x - mXDown, y - mYDown);
mCurrentResizeFrame.visualizeResizeForDelta(x - mXDown, y - mYDown);
mCurrentResizeFrame.onTouchUp();
mCurrentResizeFrame = null;
}
}
@@ -383,6 +384,7 @@ public class DragLayer extends FrameLayout {
public void clearAllResizeFrames() {
if (mResizeFrames.size() > 0) {
for (AppWidgetResizeFrame frame: mResizeFrames) {
frame.commitResize();
removeView(frame);
}
mResizeFrames.clear();