How to Set Focus to a TextView, using Java
added in API Level 1Set the focus to a TextView using Java.
1. Find the TextView by using findViewById.
2. In the MainActivity.java file, add the code below to the onCreate method.
myTextView.setSelected(true);
Related Articles: