Hello, is it possible to apply a bottom padding to...
# compose
n
Hello, is it possible to apply a bottom padding to a component based on the keyboard visibility? Right now we do this
Copy code
if (WindowInsets.isImeVisible) 24.dp else 16.dp
but this is causing component to animate with a latency(bad UX). Is it possible to apply the padding as soon as the keyboard is intended to be shown or hidden before the final position?
1
j
This might help -

https://youtu.be/mlL6H-s0nF0?t=264

n
Hey @Jishin Dev [JD] thanks! Yeah
imePadding
work fine but we have different padding per state. If the keyboard is visible it is
24.dp
applied otherwise
16.dp