I have in a screen an edit text. I want to do something button done . On google nexus s , samsung galaxy it works perfect. On keyboard the button appears with text "done". On htc the button does not appears it appear enter simbol. I ve tried to ad in code or clause to treat event enter but it does not respond
开发者_高级运维 edit1.setImeOptions(EditorInfo.IME_ACTION_DONE);
edit1.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) {
if (arg1 == EditorInfo.IME_ACTION_DONE) {
chercher.performClick();
}
return true;
}
});
Thanks in advance, Raluca
AFAIK, IME Actions are not consistant across device vendors. My advice would be to keep your listener and also make a provision in your design to have a button in case the listener doesn't fire.
精彩评论