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
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…