https://kotlinlang.org logo
#compose
Title
# compose
m

mattinger

02/22/2024, 4:17 PM
Has anyone had any experience with getting an input text working in a Popup window? When i try to do this, the keyboard never comes up. Something as simple as this doesn’t work:
Copy code
Popup(alignment = Alignment.Center) {
                    Surface(modifier = Modifier.fillMaxSize()) {
                        Column(modifier = Modifier.padding(16.dp)) {
                            OutlinedTextField(
                                value = textValue.value,
                                onValueChange = { textValue.value = it })
                        }

                    }
                }
            }
i

Ivan Matkov

02/22/2024, 4:52 PM
PopupProperties.focusable
m

mattinger

02/22/2024, 11:59 PM
Thank you @Ivan Matkov I’ve been struggling over this for months.
So i still have a bit of an isssue @Ivan Matkov, but it’s an odd case. We’re in a hybrid xml/compose environment and the main part of the screen is owned elsewhere and in the regular view world. We have some parts of the screen written in compose that need to popup modal bottom sheets. So what i’m doing is layering these things so that i can get access to the full screen height. Popup ModalBottomSheetLayout TextField The problem is when the popup is involved, the keyboard ends up over the text field. .
i

Ivan Matkov

02/23/2024, 5:21 PM
See
WindowInsets.ime
or
WindowInsets.safeDrawing
m

mattinger

02/23/2024, 5:59 PM
I tried apply the imePadding modifier, but i can see the field briefly moving up and then ends up back behind the keyboard again.
2 Views