Add logic to handle cases that IME is already shown
The logic was removed previously by mistake. This CL adds it back and takes care of the animation direction. Fix: 152450770 Test: Steps in the bug. Change-Id: I4a0ca2593dab891232e2f9d4a82400a700b8f069
This commit is contained in:
@@ -272,13 +272,18 @@ public class DisplayImeController implements DisplayController.OnDisplaysChanged
|
||||
}
|
||||
mAnimation.cancel();
|
||||
}
|
||||
mAnimationDirection = show ? DIRECTION_SHOW : DIRECTION_HIDE;
|
||||
final float defaultY = mImeSourceControl.getSurfacePosition().y;
|
||||
final float x = mImeSourceControl.getSurfacePosition().x;
|
||||
final float hiddenY = defaultY + imeSource.getFrame().height();
|
||||
final float shownY = defaultY;
|
||||
final float startY = show ? hiddenY : shownY;
|
||||
final float endY = show ? shownY : hiddenY;
|
||||
if (mAnimationDirection == DIRECTION_NONE && mImeShowing && show) {
|
||||
// IME is already showing, so set seek to end
|
||||
seekValue = shownY;
|
||||
seek = true;
|
||||
}
|
||||
mAnimationDirection = show ? DIRECTION_SHOW : DIRECTION_HIDE;
|
||||
mImeShowing = show;
|
||||
mAnimation = ValueAnimator.ofFloat(startY, endY);
|
||||
mAnimation.setDuration(
|
||||
|
||||
Reference in New Issue
Block a user