android - How to detect KEYCODE_DEL on soft keyboard? -
mmessagecomposeusernames multiautocompletetextview , want delete space (if last char of multiautocompletetextview ) or delete single word (to last " " , if not). code: mmessagecomposeusernames.setonkeylistener(new view.onkeylistener() { @override public boolean onkey(view v, int keycode, keyevent event) { //you can identify key pressed buy checking keycode value keyevent.keycode_ if(keycode == keyevent.keycode_del){ string string = mmessagecomposeusernames.gettext().tostring(); if (!string.substring(string.length() - 1).equals(" ")) { if (string.contains(" ")) { string = string.substring(0, string.lastindexof(" ")); } else { string = ""; } } log.i("string", string); mmessagecomposeusernames.se...