minimal scale under the new view size.
Bug:
6584425
Change-Id: I7dcc748cb3659a06f2ca4d8550d075fdda2949fa
public void setViewSize(int viewW, int viewH) {
if (viewW == mViewW && viewH == mViewH) return;
+ boolean wasMinimal = isAtMinimalScale();
+
mViewW = viewW;
mViewH = viewH;
initPlatform();
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()) {