Reputation: 1967
I have two edittexts 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
Upvotes: 0
Views: 1127
Reputation: 7635
public boolean onKeyDown(int keyCode, KeyEvent event) {
if(keyCode==KeyEvent.KEYCODE_ENTER)
{
check for null;
}
return(super.onKeyDown(keyCode, event));
}
Upvotes: 1