Capturing Android soft key events
I have two edit开发者_开发知识库texts and a button in my layout.When I press the 'done' key in softkeyboard, I need to catch that key event and perform null checking for these edit fields.Can anyone kindly help me on this?
BR, Rony
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode==KeyEvent.KEYCODE_ENTER)
{
check for null;
}
return(super.onKeyDown(keyCode, event));
}
精彩评论