First way:
etPassword.post(() -> {
etPassword.requestFocus();
InputMethodManager manager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(etPassword, InputMethodManager.SHOW_IMPLICIT);
});
Second way:
In Manifest:
<activity
android:name=".activities.LoginActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateVisible"/>
In code:
etPassword.requestFocus();