Revert "Fix view flicker when switching between keyboard and attachment/emoji keyboards."
This reverts commit 1618141342
.
This commit is contained in:
parent
08f1ddb212
commit
e947979169
1 changed files with 9 additions and 1 deletions
|
@ -107,6 +107,10 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
|
|||
}
|
||||
|
||||
private void updateKeyboardState() {
|
||||
updateKeyboardState(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
private void updateKeyboardState(int previousHeight) {
|
||||
if (viewInset == 0 && Build.VERSION.SDK_INT >= 21) viewInset = getViewInset();
|
||||
|
||||
getWindowVisibleDisplayFrame(rect);
|
||||
|
@ -126,7 +130,11 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
|
|||
onKeyboardOpen(keyboardHeight);
|
||||
}
|
||||
} else if (keyboardOpen) {
|
||||
onKeyboardClose();
|
||||
if (previousHeight == keyboardHeight) {
|
||||
onKeyboardClose();
|
||||
} else {
|
||||
postDelayed(() -> updateKeyboardState(keyboardHeight), 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue