I have 3 EditText
:
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusedByDefault="false"
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/editText1" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusedByDefault="true"
android:clickable="false"
android:id="@+id/editText2" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusedByDefault="false"
android:id="@+id/editText3" />
I want when the activity is opened the second EditText
to be focused(with the cursor blinking in it) but when I tap on it I don't want the keyboard to show up.
Here's an example I put together that works for me. And with this solution, you can remove the "focusedByDefault" and "clickable" attributes from all of your EditText views in your layout file.