I have an android app with certain keyboard layouts and some defined actions for the enter key on some textviews. For e.g., the textviews are defined with
android:imeOptions="actionGo"
android:inputType="text"
and i have an EditText with onEditorActionListener defined as
txtView.setOnEditorActionListener(this);
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_GO) {
// do something
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
return true;
}
return false;
}
This works fine in the android version, but when the same is ported to BB 10 device, the enter key is not reflected with the specified action (in this case 'Go') and also, when the enter button is tapped, nothing happens even thought the action listener is defined.
Is there a way to resolve this or make it work? Or am i missing something here?
I am running on Z10 with 10.0.9.422.