SyntaxFix
Write A Post
Hire A Developer
Questions
Try this:
max.setOnKeyListener(new OnKeyListener(){ @Override public boolean onKey(View v, int keyCode, KeyEvent event){ if(keyCode == event.KEYCODE_ENTER){ //do what you want } } });