Skip to content

Commit 5ddad16

Browse files
committed
fix
Signed-off-by: alperozturk <[email protected]>
1 parent 5decc01 commit 5ddad16

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

ui/src/main/java/com/nextcloud/android/common/ui/util/extensions/WindowExtensions.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ fun Window?.addSystemBarPaddings() {
1919
}
2020

2121
ViewCompat.setOnApplyWindowInsetsListener(decorView) { v: View, insets: WindowInsetsCompat ->
22-
val bars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
22+
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
23+
val ime = insets.getInsets(WindowInsetsCompat.Type.ime())
24+
val bottomInset = maxOf(systemBars.bottom, ime.bottom)
2325

2426
v.updatePadding(
25-
left = bars.left,
26-
top = bars.top,
27-
right = bars.right,
28-
bottom = bars.bottom
27+
left = systemBars.left,
28+
top = systemBars.top,
29+
right = systemBars.right,
30+
bottom = bottomInset
2931
)
3032

3133
WindowInsetsCompat.CONSUMED

0 commit comments

Comments
 (0)