Correctly recenter the wallpaper when going back to default screen.

This commit is contained in:
Romain Guy
2010-02-18 00:22:58 +01:00
parent 59d5245b0f
commit ed2390e709

View File

@@ -256,6 +256,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
mPreviousIndicator.setLevel(mCurrentScreen);
mNextIndicator.setLevel(mCurrentScreen);
scrollTo(mCurrentScreen * getWidth(), 0);
updateWallpaperOffset();
invalidate();
}
@@ -833,7 +834,7 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag
mPreviousIndicator.setLevel(mNextScreen);
mNextIndicator.setLevel(mNextScreen);
View focusedChild = getFocusedChild();
if (focusedChild != null && screenDelta != 0 && focusedChild == getChildAt(mCurrentScreen)) {
focusedChild.clearFocus();