I have a edit text in my app. When the user touches the edit text the whole text should be selected and when he starts typing text should be cleared. An example is browser addre
This is working , all text will be selected and when user type something that will remove it.
editText.setSelectAllOnFocus(true);
editText.requestFocus();
editText.postDelayed(new Runnable() {
@Override
public void run() {
InputMethodManager keyboard = (InputMethodManager) catalougeJobDetailFragment
.getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
keyboard.showSoftInput(commentEt, 0);
}
}, 20);