When i open my Activity my EditText automatically gain focus and it shows keyboard... So how to hide the keyboar..??
Answer :
For Activity
place the below code into your onCreate()
method
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
For Fragment
place the below code into your onCreateView()
method
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);