Thread
#compose
    bruno.aybar

    bruno.aybar

    2 years ago
    Hello. I've been seen weird issues when dealing with TextFields. Basically, the touch area for every component is incorrect after the soft keyboard has been opened. (attaching video on the thread). I can easily reproduce in these scenarios: • having a list of textfields, and select on one that has to be moved by to display the keyboard. Touch is now not working as expected • having a textfield aligned at bottom, open keyboard. For this case, I checked Jetchat app to see how that's handled, because I'm not seeing the issue there. However, I'm also seeing that there, ScrollState is used (I haven't check what that exactly does, but I guess it's handling scroll manually?) I wonder if that is a known issue, a bug, or an expected behavior in which scroll has to be handled manually?
    and here's another one with the TextField at bottom (noticed how I clicked somewhere else in the screen, and the TextField gets focused) :
    Michał Jurczyk

    Michał Jurczyk

    2 years ago
    Are you using
    LazyColumn
    or native UI
    RecyclerView
    ? I had this issue when I tried to put
    Composables
    into a Recycler 🤔
    bruno.aybar

    bruno.aybar

    2 years ago
    I'm able to reproduce that behavior with ScrollableColumn, LazyColumn, and Stack w/ TextField at bottom
    Adam Powell

    Adam Powell

    2 years ago
    We have a few known issues around this sort of thing, they're being worked on
    bruno.aybar

    bruno.aybar

    2 years ago
    That's great news, thanks Adam!
    Timo Drick

    Timo Drick

    2 years ago
    Can you try to encapsulate your list item with key(item) { .... } sometimes this helps
    bruno.aybar

    bruno.aybar

    2 years ago
    @Timo Drick does not seem to collections, but rather anytime the soft keyboard is opened and the contents have to be moved up to focus the TextField
    Adam Powell

    Adam Powell

    2 years ago
    the issues we're tracking are around how touch event offsets are tracked during
    adjustPan
    IME handling.
    Some internal bookkeeping isn't being updated as expected
    In the meantime,
    adjustPan
    isn't often what you want unless it's a floating dialog window, and compose isn't wiring up the autodetection of scrolling containers in the view hierarchy yet that usually changes the default to
    adjustResize
    if you have a RecyclerView or ScrollView
    You can probably sidestep this issue by setting
    adjustResize
    explicitly on your activity tag in your manifest
    bruno.aybar

    bruno.aybar

    2 years ago
    I tried that too, as I saw that's done in Jetchat app, however did not worked for me 😅
    I also tested doing it the old way, using a RelativeLayout with TextField at bottom, and in that case it works for me using
    adjustPan
    and
    adjustResize
    taking my preview comment back,
    adjustResize
    seems to do the trick with TextField at bottom.
    Adam Powell

    Adam Powell

    2 years ago
    cool, thanks for helping confirm that it's the same issue we're tracking 🙂
    Alexander Karkossa

    Alexander Karkossa

    1 year ago
    @Adam Powell Could u tell us about your known issues with these types of problems? Ar all fixed and released with alpha05? 😅