In my app I have a webview that displays some content. One of these screen has a text box to fill in. I want to capture when the user presses the done button on the keyboard but there's no edit text to add a listener too. How can I capture the action regardless of device & keyboard?
I've tried these with little luck. EditText with textPassword inputType, but without Softkeyboard
android: Softkeyboard perform action when Done key is pressed
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_ENTER:
// code here
break;
default:
return super.onKeyUp(keyCode, event);
}
return true;
}
My class overrides KeyEvent.Callback but the above funtion onKeyDown is never called.