kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix view flicker when switching between keyboard and attachment/emoji keyboards.
rodzic
d7fb05f596
commit
1618141342
|
@ -107,10 +107,6 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateKeyboardState() {
|
private void updateKeyboardState() {
|
||||||
updateKeyboardState(Integer.MAX_VALUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateKeyboardState(int previousHeight) {
|
|
||||||
if (viewInset == 0 && Build.VERSION.SDK_INT >= 21) viewInset = getViewInset();
|
if (viewInset == 0 && Build.VERSION.SDK_INT >= 21) viewInset = getViewInset();
|
||||||
|
|
||||||
getWindowVisibleDisplayFrame(rect);
|
getWindowVisibleDisplayFrame(rect);
|
||||||
|
@ -130,11 +126,7 @@ public class KeyboardAwareLinearLayout extends LinearLayoutCompat {
|
||||||
onKeyboardOpen(keyboardHeight);
|
onKeyboardOpen(keyboardHeight);
|
||||||
}
|
}
|
||||||
} else if (keyboardOpen) {
|
} else if (keyboardOpen) {
|
||||||
if (previousHeight == keyboardHeight) {
|
onKeyboardClose();
|
||||||
onKeyboardClose();
|
|
||||||
} else {
|
|
||||||
postDelayed(() -> updateKeyboardState(keyboardHeight), 100);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue