Is there any way to change android:windowSoftInputMode value from java class?

Use the following to change the softInputMode for an Activity.

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

Use the following to change the softInput type for an EditText.

mEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);

Thanks to @Eliezer for correction

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)