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
Call EditText.setSelectAllOnFocus(boolean selectAllOnFocus) to select all text on focus.
EditText.setSelectAllOnFocus(boolean selectAllOnFocus)
Set a click listener to your EditText and in onClick call edittext.selectAll();
EditText
onClick
edittext.selectAll();