From 5be8a59a5a6d6a57a253812654c6283ce5b63d73 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 4 Feb 2014 11:43:58 +0900 Subject: [PATCH] Use "Key popup dismiss delay" to control key preview zoom out animation Bug: 12809303 Change-Id: I2db0362a2f8c512145f1cf9326f06e5f922987b8 --- .../src/com/android/inputmethod/keyboard/MainKeyboardView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 810bd9150..3a2869950 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -705,7 +705,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack final AnimatorSet zoomOutAnimation = new AnimatorSet(); zoomOutAnimation.play(scaleXAnimation).with(scaleYAnimation); // TODO: Implement preference option to control key preview animation duration. - zoomOutAnimation.setDuration(mKeyPreviewZoomOutDuration); + final int zoomOutDuration = Math.min(mKeyPreviewZoomOutDuration, mKeyPreviewLingerTimeout); + zoomOutAnimation.setDuration(zoomOutDuration); zoomOutAnimation.setInterpolator(ACCELERATE_INTERPOLATOR); zoomOutAnimation.addListener(new AnimatorListenerAdapter() { @Override