diff options
| author | Tadashi G. Takaoka <takaoka@google.com> | 2011-09-20 16:16:34 +0900 |
|---|---|---|
| committer | Tadashi G. Takaoka <takaoka@google.com> | 2011-09-27 19:02:24 +0900 |
| commit | f451ed2012df7eb080de045a93a494aecd2775b4 (patch) | |
| tree | 379f999c507a881fcb07a3d1baeecf217bcffc16 /java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | |
| parent | e4ff4d6b1c14bb7ce20f8b93a90f9f80a3ea5fc3 (diff) | |
Forward touch events above the keyboard to the suggestions strip
The gutter area between the suggestions strip and the top-row keys
looks like a part of the suggestions strip, and the touch events
landing on the area should be forwarded to the suggestions strip.
Bug: 5246673
Change-Id: I92af763be0feed21aa36ceffb5d575abe554f19e
Diffstat (limited to 'java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java')
| -rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 2d123699e..a4684358d 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -32,6 +32,7 @@ import android.view.inputmethod.EditorInfo; import com.android.inputmethod.accessibility.AccessibleKeyboardViewProxy; import com.android.inputmethod.keyboard.internal.ModifierKeyState; import com.android.inputmethod.keyboard.internal.ShiftKeyState; +import com.android.inputmethod.latin.InputView; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.LocaleUtils; @@ -62,7 +63,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha private SubtypeSwitcher mSubtypeSwitcher; private SharedPreferences mPrefs; - private View mCurrentInputView; + private InputView mCurrentInputView; private LatinKeyboardView mKeyboardView; private LatinIME mInputMethodService; private String mPackageName; @@ -230,6 +231,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha private void setKeyboard(final Keyboard keyboard) { final Keyboard oldKeyboard = mKeyboardView.getKeyboard(); mKeyboardView.setKeyboard(keyboard); + mCurrentInputView.setKeyboardGeometry(keyboard.mTopPadding); mCurrentId = keyboard.mId; mSwitchState = getSwitchState(mCurrentId); updateShiftLockState(keyboard); @@ -762,7 +764,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha for (int i = 0; i < Utils.GCUtils.GC_TRY_LOOP_MAX && tryGC; ++i) { try { setContextThemeWrapper(mInputMethodService, newThemeIndex); - mCurrentInputView = LayoutInflater.from(mThemeContext).inflate( + mCurrentInputView = (InputView)LayoutInflater.from(mThemeContext).inflate( R.layout.input_view, null); tryGC = false; } catch (OutOfMemoryError e) { |
