android: transition first, then move the viewport to the cursor

Change-Id: Iabc9b45dc3198472adda9b6fad1d531c41635f00
This commit is contained in:
Tomaž Vajngerl
2015-04-10 17:43:55 +09:00
parent 0b2a85876c
commit 98b12bf77f

View File

@@ -156,14 +156,14 @@ public class InvalidationHandler implements Document.MessageCallback {
mDocumentOverlay.positionCursor(cursorRectangle);
mDocumentOverlay.positionHandle(SelectionHandle.HandleType.MIDDLE, cursorRectangle);
if (mState == OverlayState.TRANSITION || mState == OverlayState.CURSOR) {
changeStateTo(OverlayState.CURSOR);
}
if (mKeyEvent) {
moveViewportToMakeCursorVisible(cursorRectangle);
mKeyEvent = false;
}
if (mState == OverlayState.TRANSITION || mState == OverlayState.CURSOR) {
changeStateTo(OverlayState.CURSOR);
}
}
}