Yes you can create an onClickListener and just get the text from edit text and delete the last character.
Button delete = (Button) findViewById(R.id.buttondel);
if( delete != null ) {
delete.setOnClickListener(new OnClickListener() {
@Override
public void onClick() {
String textString = editText.getText().toString();
if( textString.length() > 0 ) {
editText.setText(textString.substring(0, textString.length() - 1 ));
editText.setSelection(editText.getText().length());//position cursor at the end of the line
}
}
});
}
Edit: Also don't forget to check the string length is greater than 0 before doing this in the event a or b hasn't been pressed when the user hits delete.