summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/ui/PositionController.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/PositionController.java b/src/com/android/gallery3d/ui/PositionController.java
index ae0df34b5..b6737226b 100644
--- a/src/com/android/gallery3d/ui/PositionController.java
+++ b/src/com/android/gallery3d/ui/PositionController.java
@@ -200,6 +200,8 @@ class PositionController {
public void setViewSize(int viewW, int viewH) {
if (viewW == mViewW && viewH == mViewH) return;
+ boolean wasMinimal = isAtMinimalScale();
+
mViewW = viewW;
mViewH = viewH;
initPlatform();
@@ -210,6 +212,13 @@ class PositionController {
updateScaleAndGapLimit();
+ // If the focused box was at minimal scale, we try to make it the
+ // minimal scale under the new view size.
+ if (wasMinimal) {
+ Box b = mBoxes.get(0);
+ b.mCurrentScale = b.mScaleMin;
+ }
+
// If we have the opening animation, do it. Otherwise go directly to the
// right position.
if (!startOpeningAnimationIfNeeded()) {