Fix dialog when toggling keyboard multiple times

This commit is contained in:
topjohnwu 2020-08-26 06:39:49 -07:00
parent ca5030a646
commit bf5798190d

View File

@ -55,10 +55,12 @@ class MagiskDialog(
)
}
val paddingTop = binding.root.paddingTop
val paddingBottom = binding.root.paddingBottom
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { view, insets ->
view.updatePadding(
top = view.paddingTop + insets.systemWindowInsetTop,
bottom = view.paddingBottom + insets.systemWindowInsetBottom
top = paddingTop + insets.systemWindowInsetTop,
bottom = paddingBottom + insets.systemWindowInsetBottom
)
insets
}