7

EditText & Enter key

view full story
linux-howto

http://stackoverflow.com – I want the functionallity just Enter -- EditText return and submit the text shift+Enter -- new line in EditText this is the code but it don,t work. No difference between Enter and shift+Enter (no new line): EditText text=(EditText)findViewById(R.id.text); text.setOnEditorActionListener( new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if ( (actionId == EditorInfo.IME_ACTION_DONE) || ( (event.isShiftPressed()==false) && (event.getKeyCode() == KeyEvent.KEY (HowTos)