一、 xml中实现
添加 android:selectAllOnFocus=“true” 即可
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:selectAllOnFocus="true" />
二、代码实现
editText.setSelectAllOnFocus(true);
一、 xml中实现
添加 android:selectAllOnFocus=“true” 即可
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:selectAllOnFocus="true" />
二、代码实现
editText.setSelectAllOnFocus(true);