How to hide Soft Keyboard when activity starts
Clash Royale CLAN TAG #URR8PPP How to hide Soft Keyboard when activity starts I have an Edittext with android:windowSoftInputMode="stateVisible" in Manifest. Now the keyboard will be shown when I start the activity. How to hide it? I cannot use android:windowSoftInputMode="stateHidden because when keyboard is visible then minimize the app and resume it the keyboard should be visible. I tried with android:windowSoftInputMode="stateVisible" android:windowSoftInputMode="stateHidden InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); but it did not work. 18 Answers 18 Use the following functions t...