I have one edittext EditText et1=(EditText)findViewById(R.id.EditText01);
when i want to clear edittext i use et1.setText(""); but if i have to clear edittext one by one character from the last for this i have no solution can u pls give me solution
I have one edittext EditText et1=(EditText)findViewById(R.id.EditText01);
when i want to clear edittext i use et1.setText(""); but if i have to clear edittext one by one character from the last for this i have no solution can u pls give me solution
Do you know about SubString?
String contents = et1.getText().toString();
et1.setText(contents.substring(0, contents.length()-2));
Well, if you know what you want to clear you can get the text from the edittext and then remove the amount of characters from the end using string.substring(0,numOfEND);