diff options
author | 2011-04-21 14:51:53 +0900 | |
---|---|---|
committer | 2011-04-21 15:20:37 +0900 | |
commit | 46ca84584810dfe606e709b3fe283cbde8aba5f5 (patch) | |
tree | e2256e80281fbf9166e08e428e843a36eb61d6e4 /java/src | |
parent | 6d645e13e447632e48fdcdabcf4c3620a33cb268 (diff) | |
download | latinime-46ca84584810dfe606e709b3fe283cbde8aba5f5.tar.gz latinime-46ca84584810dfe606e709b3fe283cbde8aba5f5.tar.xz latinime-46ca84584810dfe606e709b3fe283cbde8aba5f5.zip |
Compute content and visible insets even in voice mode
Bug: 4317779
Change-Id: If54d15466db9d0362b4470a2ba4618377bdffc2a
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 13ef4ffe8..a680b9825 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -901,15 +901,15 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar public void onComputeInsets(InputMethodService.Insets outInsets) { super.onComputeInsets(outInsets); final KeyboardView inputView = mKeyboardSwitcher.getInputView(); + if (inputView == null) + return; + final int containerHeight = mCandidateViewContainer.getHeight(); + int touchY = containerHeight; // Need to set touchable region only if input view is being shown - if (inputView != null && mKeyboardSwitcher.isInputViewShown()) { - final int containerHeight = mCandidateViewContainer.getHeight(); - int touchY = containerHeight; + if (mKeyboardSwitcher.isInputViewShown()) { if (mCandidateViewContainer.getVisibility() == View.VISIBLE) { touchY -= mCandidateStripHeight; } - outInsets.contentTopInsets = touchY; - outInsets.visibleTopInsets = touchY; final int touchWidth = inputView.getWidth(); final int touchHeight = inputView.getHeight() + containerHeight // Extend touchable region below the keyboard. @@ -920,6 +920,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } setTouchableRegionCompat(outInsets, 0, touchY, touchWidth, touchHeight); } + outInsets.contentTopInsets = touchY; + outInsets.visibleTopInsets = touchY; } @Override |