Account for bottom bar height in attachment picker
This commit is contained in:
parent
0eb5b79188
commit
c3561a374e
1 changed files with 4 additions and 3 deletions
|
|
@ -1428,11 +1428,12 @@ class ThreadActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupKeyboardListener() {
|
private fun setupKeyboardListener() {
|
||||||
val typeMask = WindowInsetsCompat.Type.ime()
|
val imeTypeMask = WindowInsetsCompat.Type.ime()
|
||||||
|
val navigationBarMask = WindowInsetsCompat.Type.navigationBars()
|
||||||
|
|
||||||
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { _, insets ->
|
ViewCompat.setOnApplyWindowInsetsListener(window.decorView) { _, insets ->
|
||||||
if (insets.isVisible(typeMask)) {
|
if (insets.isVisible(imeTypeMask)) {
|
||||||
config.keyboardHeight = insets.getInsets(typeMask).bottom
|
config.keyboardHeight = insets.getInsets(imeTypeMask).bottom - insets.getInsets(navigationBarMask).bottom
|
||||||
hideAttachmentPicker()
|
hideAttachmentPicker()
|
||||||
} else if (isAttachmentPickerVisible) {
|
} else if (isAttachmentPickerVisible) {
|
||||||
showAttachmentPicker()
|
showAttachmentPicker()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue