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

Aaron Waller

06/02/2022, 7:22 AM
How can I perform an action when the user closes the keyboard? All i can find is how to handle ImeAction clicks. I want to call focusManager.clearFocus() no matter how the user closes the keyboard.
f

Filip Wiesner

06/02/2022, 7:25 AM
What if the user is using an external hardware keyboard? You would clear the focus when they would hide the software one?
4
z

Zach Klippenstein (he/him) [MOD]

06/02/2022, 4:18 PM
Yea there are UX questions, but if you really do want to check you can use
WindowInsets.isImeVisible
(docs), but that will only work on API 23 and above.
5 Views