Anyone knows how to hide keyboard when anywhere on the screen apart from the text field is clicked or scrolled?
Any global solution, i don’t want to add it on every screen
z
Zach Klippenstein (he/him) [MOD]
01/09/2024, 6:04 PM
LocalSoftwareKeyboardController
v
Vaibhav Jaiswal
01/10/2024, 6:41 AM
@Zach Klippenstein (he/him) [MOD] No, I meant if theres like a config, which I can do once that, if keyboard is open and if the user touches or scrolls something which is not a text field
The keyboard should close and focus taken away from the text Field
I dont want to add this
onPointerInput
,
scroll listener
, etc and manually hide the keyboard for each and every screen composable
z
Zach Klippenstein (he/him) [MOD]
01/11/2024, 2:51 AM
Ah nope. That’s not how focus works in compose, and it’s not configurable.
g
Gumiku
01/15/2024, 6:15 AM
I do have the same question
@Zach Klippenstein (he/him) [MOD] do you have any suggestion or workaround how to implement this?🤔