I have an Activity in Android, with two elements:
EditTextListView
When my Activity starts, the EditText immediately has the input focus (flashing cursor). I don’t want any control to have input focus at startup. I tried:
EditText.setSelected(false);
EditText.setFocusable(false);
No luck. How can I convince the EditText to not select itself when the Activity starts?
Adding the tags
android:focusableInTouchMode="true"andandroid:focusable="true"to the parent layout (e.g.LinearLayoutorConstraintLayout) like in the following example, will fix the problem.