j

    julioromano

    1 year ago
    Software keyboard closes on configuration change I just noticed that when typing in a
    BasicTextField
    the software keyboard closes whenever there’s a configuration change (rotation, dark mode switch, etc.). I tried fiddling with the
    windowSoftInputMode
    activity manifest attribute but to no avail. Is this the intended behavior? Is there any way to change it (apart from disallowing any configuration change which is not possible in my case)? PS: The text field also happens to loose focus during the config change.
    cb

    cb

    1 year ago
    Sounds like a bug. Please raise an issue on the tracker.
    j

    julioromano

    1 year ago
    g

    gitai

    1 year ago
    IMO, this might actually be reasonable to have… I figure that in Compose (as apposed to Views) only the developer is responsible for handling whats displayed after the device rotates, there is no attempt by the runtime to adjust the UI layout to the new orientation as in the View system. Like, in case of rotation the default behaviour I observed in the Emulator was that the entire screen rotates clockwise (or counter, don’t remember) so I don’t think it make sense to have the keyboard on it’s side when going from portrait to landscape for example. I also think it can be a bit overwhelming if the color of the keyboard suddenly changed to accommodate dark mode, but I don’t know if that what defines the scenario.