Fix 3482911: NPE in CustomizePagedView.resetCheckedItem

Also fixes an issue where quick swipes on an item could
cause it to animate in from (0, 0) sometimes.

Change-Id: Ie3312389bcb5109f4b26ec518a29b4aa88161377
This commit is contained in:
Patrick Dubroy
2011-02-24 12:16:12 -08:00
parent a0aa0121b9
commit 6f13342ffd
3 changed files with 17 additions and 17 deletions

View File

@@ -245,5 +245,13 @@ public class DragView extends View {
void remove() {
mWindowManager.removeView(this);
}
int[] getPosition(int[] result) {
WindowManager.LayoutParams lp = mLayoutParams;
if (result == null) result = new int[2];
result[0] = lp.x;
result[1] = lp.y;
return result;
}
}