diff options
author | 2014-09-24 03:24:17 +0000 | |
---|---|---|
committer | 2014-09-24 03:24:18 +0000 | |
commit | 9a73a79cbe345ad637782fff6947d5ddced6aaf4 (patch) | |
tree | 1b12f43d575fbf1fcf19bce9634886a367b06814 /java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java | |
parent | b5dface8da9ed28f018b3f3351529da29857437d (diff) | |
parent | d144b7874efc843bccc3ec7cd9a48d32d8f2395d (diff) | |
download | latinime-9a73a79cbe345ad637782fff6947d5ddced6aaf4.tar.gz latinime-9a73a79cbe345ad637782fff6947d5ddced6aaf4.tar.xz latinime-9a73a79cbe345ad637782fff6947d5ddced6aaf4.zip |
Merge "Fix not intercepting touch event while in modal mode"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java index f7b6f919d..907e3fa42 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/MoreSuggestionsView.java @@ -40,6 +40,8 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView { public abstract void onSuggestionSelected(final SuggestedWordInfo info); } + private boolean mIsInModalMode; + public MoreSuggestionsView(final Context context, final AttributeSet attrs) { this(context, attrs, R.attr.moreKeysKeyboardViewStyle); } @@ -53,6 +55,7 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView { @Override public void setKeyboard(final Keyboard keyboard) { super.setKeyboard(keyboard); + mIsInModalMode = false; // With accessibility mode off, {@link #mAccessibilityDelegate} is set to null at the // above {@link MoreKeysKeyboardView#setKeyboard(Keyboard)} call. // With accessibility mode on, {@link #mAccessibilityDelegate} is set to a @@ -74,12 +77,17 @@ public final class MoreSuggestionsView extends MoreKeysKeyboardView { updateKeyDrawParams(keyHeight); } - public void adjustVerticalCorrectionForModalMode() { + public void setModalMode() { + mIsInModalMode = true; // Set vertical correction to zero (Reset more keys keyboard sliding allowance // {@link R#dimen.config_more_keys_keyboard_slide_allowance}). mKeyDetector.setKeyboard(getKeyboard(), -getPaddingLeft(), -getPaddingTop()); } + public boolean isInModalMode() { + return mIsInModalMode; + } + @Override protected void onKeyInput(final Key key, final int x, final int y) { if (!(key instanceof MoreSuggestionKey)) { |