Friday, 30 December 2011

How to Hide Keyboard onStartup of Activity

Write Following Line in your onCreate Method:-


For Hide Keyboard:
getWindow().setSoftInputMode(WindowManager.LayoutParams.
SOFT_INPUT_STATE_ALWAYS_HIDDEN);

For Appear Keyboard:
getWindow().setSoftInputMode(WindowManager.LayoutParams.
SOFT_INPUT_STATE_ALWAYS_VISIBLE);


Enjoy :-) 

Don’t forget to provide feedback or follow this blog, if you find this blog is useful.

3 comments: