am 244eca38: Merge "Fix emoji keyboard insets"
* commit '244eca3809317ebe3b9a7c4ecc73c04beac2b87e': Fix emoji keyboard insetsmain
commit
786f9243aa
|
@ -314,15 +314,19 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
mState.onCodeInput(code, mLatinIME.getCurrentAutoCapsState());
|
mState.onCodeInput(code, mLatinIME.getCurrentAutoCapsState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isShowingEmojiKeyboard() {
|
||||||
|
return mEmojiKeyboardView.getVisibility() == View.VISIBLE;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isShowingMoreKeysPanel() {
|
public boolean isShowingMoreKeysPanel() {
|
||||||
if (mEmojiKeyboardView.getVisibility() == View.VISIBLE) {
|
if (isShowingEmojiKeyboard()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return mKeyboardView.isShowingMoreKeysPanel();
|
return mKeyboardView.isShowingMoreKeysPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public View getVisibleKeyboardView() {
|
public View getVisibleKeyboardView() {
|
||||||
if (mEmojiKeyboardView.getVisibility() == View.VISIBLE) {
|
if (isShowingEmojiKeyboard()) {
|
||||||
return mEmojiKeyboardView;
|
return mEmojiKeyboardView;
|
||||||
}
|
}
|
||||||
return mKeyboardView;
|
return mKeyboardView;
|
||||||
|
|
|
@ -1234,7 +1234,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
int visibleTopY = extraHeight;
|
int visibleTopY = extraHeight;
|
||||||
// Need to set touchable region only if input view is being shown
|
// Need to set touchable region only if input view is being shown
|
||||||
if (visibleKeyboardView.isShown()) {
|
if (visibleKeyboardView.isShown()) {
|
||||||
if (mSuggestionStripView.getVisibility() == View.VISIBLE) {
|
// Note that the height of Emoji layout is the same as the height of the main keyboard
|
||||||
|
// and the suggestion strip
|
||||||
|
if (mKeyboardSwitcher.isShowingEmojiKeyboard()
|
||||||
|
|| mSuggestionStripView.getVisibility() == View.VISIBLE) {
|
||||||
visibleTopY -= suggestionsHeight;
|
visibleTopY -= suggestionsHeight;
|
||||||
}
|
}
|
||||||
final int touchY = mKeyboardSwitcher.isShowingMoreKeysPanel() ? 0 : visibleTopY;
|
final int touchY = mKeyboardSwitcher.isShowingMoreKeysPanel() ? 0 : visibleTopY;
|
||||||
|
|
Loading…
Reference in New Issue