Alex
02/16/2023, 11:16 PMModifier.imePadding()
?Alex Vanyo
02/16/2023, 11:20 PMAlex
02/16/2023, 11:26 PMAlex Vanyo
02/16/2023, 11:42 PMimePadding
and the underlying `ime`value, but there is an imeAnimationTarget value which might be useful to get the effect you’re going forjames
02/17/2023, 2:40 AMimePadding
related things, if I may ask
I noticed imePadding
and isImeVisible
were starting out correctly, but if I had the keyboard opened and switched apps (or allowed any other activity to appear really), once I came back to my app, isImeVisible
is still true, despite the ime not actually being visible, and at this point the imePadding
value is no longer correct
I also did some logging during the opening/closing ime animation, and while the imePadding value was changing, the imeAnimationSource
and imeAnimationTarget
values were always 0,0,0,0
, which meant using an expression like imeAnimationSource != imeAnimationTarget
is not a reliable indicator of animation in progress
is there a definitive guide on handling this in a composition whose parent is a Fragment, and the Fragment is hosted in a single Activity?
I’ve tried various combinations of adjustResize/setDecorFitsSystemWindows/imePadding modifier, but I cannot get it to work in this specific app — I emphasized this because in my own side projects I have it working perfectly, but I’m not using Activity/Fragment/Composable interop in those.. whereas at my day job we have a large legacy codebase, and I simply cannot get ime data to be reported correctly 😢Alex Vanyo
02/17/2023, 4:41 AMconsumeWindowInsets
to false
, which is a property to set on the ComposeView
that you'd be hosting in a Fragment: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]android.kt;l=114;drc=977d53a595ad75ee1693140c84c052cc60bce305
Setting that to false
passes through the insets to other `View`s, which might be important in your app depending on who is using insets.
Also curious what API version(s) you're seeing that on, since how insets propagate changed fairly substantially over timejames
02/20/2023, 9:52 PMconsumeWindowInsets = false
when I can find some time to jump back to it and see if that helps
the API versions I was using while trying to get insets working were 32 and 33