views:

972

answers:

3

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?

Thanks Lee

+1  A: 

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

Will
A: 

I solved this by just searching for the back key. When the back key is received I know that the soft keyboard will be cancelled.

Lee
A: 

And how have you catch this key event please ?