Possible Duplicate:
Close/hide the Android Soft Keyboard
I used the following code to hide the default keyboard to bring up my own and it works fine
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
But now when I use the following on the click of a button, the soft keyboard does not reappear. Why?
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);