Hi all, has anyone else figured out how to workaro...
# compose
Hi all, has anyone else figured out how to workaround this bug with ModalBottomSheetLayout? Seems to exist in all versions of Compose, right up to the current 1.2.0-alpha07 release. It works as expected until I enable adjustResize on the containing activity with
is enabled, the ModalBottomSheet re-animates into the screen from the bottom during the keyboard close process, despite the fact the modal was already on screen in the Expanded state. Further, while creating a video to show this bug I discovered that the layout does not obey the Animation Scale from Developer Settings (which was introduced in 1.2.0-alpha05), whereas other Compose components do in fact obey those settings. Wanted to check if anyone else knows about this or if it has already been filed on the issue tracker, before I file an issue myself.
The re-animating issue is caused by a known issue, but it'd be very helpful if you could file with a repro. Animation scale - this is not known, please file an issue (also with repro). Feel free to link here so I can assign them to myself
@jossiwolf cheers for the reply — is the known issue the same problem as this one? I have a repro project ready to go but wasn’t sure if this was definitely a bug to be filed or not.. I’ve recorded another video of myself debugging inside the
class source, where I can actually stop the “bug” from happening altogether by disabling a snap call. From 0:00 - 0:30 in this video I just click the “close keyboard” button and run through the breakpoints without changing anything, and we see the bug occur. At 0:40 you see me change the targetOffset from 784.0f to 0.0f, and this is done just as a trick to make the code inside the function
effectively do nothing.. if you dig into that function it just does a dragBy() for <targetOffset minus absoluteOffset>, and at this stage absoluteOffset is 0.0f, so it’s calling dragBy(0.0f) At 0:54 I change targetOffset back to its original value to ensure an exception is not thrown by the anchors map getValue() call. You can see in the second instance where click the “close keyboard” button but I have effectively “disabled” the
call, and we see that the bug does not occur
btw, I just noticed your profile update.. congrats on the new job mate!