only52607 / compose-floating-window

Library for creating global floating windows based on jetpack compose on Android.
Apache License 2.0
53 stars 6 forks source link

TextField not support #3

Open tkkcc opened 1 month ago

tkkcc commented 1 month ago

i try to use TextField in floating window, but keyboard input doesn't work

            val floatingWindow = ComposeFloatingWindow(applicationContext)
            floatingWindow.setContent {
                var text by remember {
                    mutableStateOf("aaa")
                }
                TextField(text, {
                    text = it
                })
//                FloatingActionButton(
//                    modifier = Modifier.dragFloatingWindow(),
//                    onClick = {
//                        Log.d("", "tap floating button")
//                    }) {
//                    Icon(Icons.Filled.Call, "Call")
//                }
            }
            floatingWindow.show()
tkkcc commented 1 month ago

it works with only FLAG_NOT_TOUCH_MODAL, same as https://github.com/xrubioj/JetpackComposeOverlayTest/issues/1

tkkcc commented 1 month ago

it also needs to be TYPE_PHONE on android 7, to let IME padding work at expected. and this match behavior of TYPE_APPLICATION_OVERLAY on 14

airalpha commented 1 day ago

it also needs to be TYPE_PHONE on android 7, to let IME padding work at expected. and this match behavior of TYPE_APPLICATION_OVERLAY on 14

Please can you provide an example ?