mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Fix scroll jump when reacting with keyboard open.
This commit is contained in:
@@ -63,6 +63,15 @@ class InputAwareConstraintLayout @JvmOverloads constructor(
|
||||
wasKeyboardVisibleBeforeToggle = false
|
||||
}
|
||||
|
||||
fun hideKeyboard(imeTarget: EditText, keepHeightOverride: Boolean = false) {
|
||||
if (isKeyboardShowing) {
|
||||
if (keepHeightOverride) {
|
||||
overrideKeyboardGuidelineWithPreviousHeight()
|
||||
}
|
||||
ViewUtil.hideKeyboard(context, imeTarget)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showInput(fragmentCreator: FragmentCreator, imeTarget: EditText) {
|
||||
inputId = fragmentCreator.id
|
||||
input = fragmentCreator.create()
|
||||
|
||||
Reference in New Issue
Block a user