Every time I open my android app, it automatically focuses the EditText
box and the soft keyboard opens up. Is there a way to focus something else on start up so the keyboard doesn't show right away?
You can force Android to hide the virtual keyboard using the InputMethodManager, calling hideSoftInputFromWindow , passing in the token of the window containing your focused view. This will force the keyboard to be hidden in all situations. In some cases you will want to pass in InputMethodManager.
You can try:
android:windowSoftInputMode="stateHidden"
for your activity in AndroidManifest.xml
Add this two lines to you main layout.
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With