4
I have a EditText
and when I use:
editText.requestFocus();
I’d like you to select the whole text, it’s possible?
4
I have a EditText
and when I use:
editText.requestFocus();
I’d like you to select the whole text, it’s possible?
5
There are two ways, the first is to change the property of the EditText
in the xml layout and add:
android:selectAllOnFocus="true"
The other is via script, no onCreate
you set to select everything in Focus:
editText.setSelectAllOnFocus(true);
Then you can use:
editText.requestFocus();
I couldn’t perform the test, but I believe selectAll
also work:
editText.selectAll();
Browser other questions tagged java android
You are not signed in. Login or sign up in order to post.