Enter key listener for Google keyboard is not working
问题 I want to add a functionality on click of "enter" key of Google's keyboard without vanquishing the default newline characteristic. I have used OnKeyListener but it is not working. EditText edittext = (EditText) findViewById(R.id.user_query); edittext.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode ==KeyEvent.KEYCODE_ENTER || keyCode == KeyEvent.KEYCODE_DPAD_CENTER)) { //here i want