How to detect when the Android software keyboard is hidden?

advertisements

I need to detect when the android software keyboard is hidden. My activity currently responds to when the hardware keyboard is hidden but the software keyboard looks like it can only be implied through a size changed event.

Does anyone know of a way that a view or activity can receive a notification when the software keyboard is hidden by the user cancelling out of keyboard mode?


Would forcing the sof tkeyboard to always be visible help?

You can add this to your Activity's xml file to ensure the softkeyboard is always visible in that Activity:

android:windowSoftInputMode="stateAlwaysVisible"

http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft