diff options
author | 2011-04-13 14:12:24 +0900 | |
---|---|---|
committer | 2011-04-13 18:59:33 +0900 | |
commit | 7a3d3ae17f7a8ca0b44e9c92328a7de7cbc80f92 (patch) | |
tree | 0975cb3d2df4eced4c836078291306761f136991 /java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | |
parent | 47d2ef69d3f94e68bf675967ce3140cbb6179279 (diff) | |
download | latinime-7a3d3ae17f7a8ca0b44e9c92328a7de7cbc80f92.tar.gz latinime-7a3d3ae17f7a8ca0b44e9c92328a7de7cbc80f92.tar.xz latinime-7a3d3ae17f7a8ca0b44e9c92328a7de7cbc80f92.zip |
Fast key preview
Previously the key preview was implemented by PopupWindow. The key
preview popup window would be dismissed and shown each time the key
was released and pressed. It turned out that it was taking several
milliseconds.
This change implements the key preview by a simple TextView which will
be layout-ed at absolute coordinates within the screen FrameLayout.
And dismissing and showing the key preview is implemented by the
TextView's visibility.
This implementation needs careful coordination of candidates.xml
layout and LatinIME.onComputeInsets to control suggestion strip
visibility.
Bug: 4179964
Change-Id: Id6347cb35b91eb14ab20dd2f312e58b54b6625a7
Diffstat (limited to 'java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java')
-rw-r--r-- | java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java index e02aac704..1ea7236f9 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java @@ -19,20 +19,9 @@ package com.android.inputmethod.compat; import com.android.inputmethod.latin.SubtypeSwitcher; import android.inputmethodservice.InputMethodService; -import android.view.View; import android.view.inputmethod.InputMethodSubtype; -import android.widget.HorizontalScrollView; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; public class InputMethodServiceCompatWrapper extends InputMethodService { - private static final Method METHOD_HorizontalScrollView_setOverScrollMode = - CompatUtils.getMethod(HorizontalScrollView.class, "setOverScrollMode", int.class); - private static final Field FIELD_View_OVER_SCROLL_NEVER = - CompatUtils.getField(View.class, "OVER_SCROLL_NEVER"); - private static final Integer View_OVER_SCROLL_NEVER = - (Integer)CompatUtils.getFieldValue(null, null, FIELD_View_OVER_SCROLL_NEVER); // CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED needs to be false if the API level is 10 // or previous. Note that InputMethodSubtype was added in the API level 11. // For the API level 11 or later, LatinIME should override onCurrentInputMethodSubtypeChanged(). @@ -66,13 +55,6 @@ public class InputMethodServiceCompatWrapper extends InputMethodService { } } - protected static void setOverScrollModeNever(HorizontalScrollView scrollView) { - if (View_OVER_SCROLL_NEVER != null) { - CompatUtils.invoke(scrollView, null, METHOD_HorizontalScrollView_setOverScrollMode, - View_OVER_SCROLL_NEVER); - } - } - ////////////////////////////////////// // Functions using API v11 or later // ////////////////////////////////////// |