mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-17 11:19:01 +00:00
Remove extra bottom spacing showing on chat
This commit is contained in:
parent
a1a5385212
commit
6a5d135756
1 changed files with 8 additions and 8 deletions
|
|
@ -163,16 +163,16 @@ class ChatBarView : LinearLayout, OnImeVisibilityChangedListener {
|
|||
}
|
||||
|
||||
override fun onImeVisibilityChanged(visible: Boolean, height: Int, safeInsets: Insets) {
|
||||
this.safeInsets = safeInsets
|
||||
imeHeight = if (visible) height else 0
|
||||
val navInset = safeInsets.bottom
|
||||
val imeOffset = if (visible) (height - navInset).coerceAtLeast(0) else 0
|
||||
|
||||
updatePadding(
|
||||
left = safeInsets.left,
|
||||
right = safeInsets.right,
|
||||
bottom = safeInsets.bottom
|
||||
left = safeInsets.left,
|
||||
right = safeInsets.right,
|
||||
bottom = navInset
|
||||
)
|
||||
|
||||
// slide the bar up under the keyboard
|
||||
translationY = if (imeHeight > 0) -imeHeight.toFloat() else 0f
|
||||
|
||||
translationY = -imeOffset.toFloat()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue