I have a couple issues with a math program im currently working on im trying to make a delete button so the user can remove any mistake made and also i want to append(“0”) but it does nothing when i press both buttons. When i append values from 1-9 it displays it but wierdly it does nothing when pressing delete and one. answer is a TextView. Any ideas would be appreciated.
case R.id.delete:
answer.append("");
break;
case R.id.zero:
answer.append("0");
break;
If answer is a TextView, then you should do something like this to append a 0:
answer.setText(answer.getText().toString()+0);