Fix view flicker when switching between keyboard and attachment/emoji keyboards.

main
Cody Henthorne 2022-12-06 14:25:31 -05:00
rodzic d7fb05f596
commit 1618141342
1 zmienionych plików z 1 dodań i 9 usunięć

Wyświetl plik

@ -107,10 +107,6 @@ 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);
@ -130,11 +126,7 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
onKeyboardOpen(keyboardHeight);
}
} else if (keyboardOpen) {
if (previousHeight == keyboardHeight) {
onKeyboardClose();
} else {
postDelayed(() -> updateKeyboardState(keyboardHeight), 100);
}
onKeyboardClose();
}
}