首先EditText不是必须有焦点才能实现全选也就是不用EditText editText.setFocusable(true);
但是必须在OnTouch的MotionEvent.ACTION_UP中设置editText.setSelectAllOnFocus(true);editText.selectAll(); 在MotionEvent.ACTION_DOWN是不可以实现全选的
首先EditText不是必须有焦点才能实现全选也就是不用EditText editText.setFocusable(true);
但是必须在OnTouch的MotionEvent.ACTION_UP中设置editText.setSelectAllOnFocus(true);editText.selectAll(); 在MotionEvent.ACTION_DOWN是不可以实现全选的