I have 2 activities, A and B. When A starts, it checks for a condition and if true, it calls startActivityForResult() to start B. B only takes text input so it
I have got two way.
Method 1. Use the following code inside the OnCreate method
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
It will prevent popping up keyboard unless you click.
or
Method 2 You can move away the focus on other view like TextView by using "requestfocus" in the xml.
Method 3 ( I think it should be avoidable) Using the following code in the manifest-
android:windowSoftInputMode="stateVisible"