Is there a way to set a listener on back pressed to close the keyboard ?
Asked
Active
Viewed 315 times
1 Answers
-1
override the function onBackPressed()
from inside your Activity

Mahmoud Omara
- 533
- 6
- 22
-
1already tried, method not called when I'm closing keyboard according logs – nicover Dec 16 '20 at 14:11
-
check this question: https://stackoverflow.com/questions/4312319/how-to-capture-the-virtual-keyboard-show-hide-event-in-android – Mahmoud Omara Dec 16 '20 at 14:15