If there is no need of keyboard then you can hide by adding following lines in to manifest
Also You can use InputMethodManager, calling hideSoftInputFromWindow
<activity
android:name=".ActivityName"
android:label="@string/name"
android:windowSoftInputMode="stateAlwaysHidden" />
android:name=".ActivityName"
android:label="@string/name"
android:windowSoftInputMode="stateAlwaysHidden" />
Also You can use InputMethodManager, calling hideSoftInputFromWindow
getWindow().setSoftInputMode(
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
OR
InputMethodManager imm = (InputMethodManager)getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(customEditText.getWindowToken(), 0);
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(customEditText.getWindowToken(), 0);
No comments:
Post a Comment