Having a pretty frustrating issue here, I have a L...
# compose
t
Having a pretty frustrating issue here, I have a LazyColumn as part of a ComposeView that is in a Fragment. That Fragment also has a traditional BottomNavigationView. When the keyboard opens, it blocks the Lazy Column and I cannot scroll. It seems a solution is to setDecorFitsSystemWindow to false and use imePadding on the LazyColumn. The issue is that imePadding does not seem to be correct for the lazy column, and I’m guessing it has to do with the BottomNavigationBar but I’m not certain how to fix it?
Colors are to help differentiate, the cyan is for the parent column in the layout and the red is the lazy column itself
So it seems to be the height of both the Navigation Bar + the BottomNavigationView
a
If I’m understanding the situation correctly, there is a
BottomNavigationView
outside of Compose, and then inside of a
ComposeView
you’re using
imePadding
. The
ComposeView
doesn’t directly know that the
BottomNavigationView
exists, or how much space it is taking up. Therefore you’re getting a “double padding” for the size of the
BottomNavigationView
being applied. The APIs I would recommend are the ones to “consume” the window insets, so that the
ComposeView
applies less of the IME as padding. There are ones inside of
Compose
(
Modifier.consumedWindowInsets
) as well as with the
WindowInsetsCompat
ones.
t
Awesome I'll check this out, I appreciate the response.