Attach OnEditorActionListener to your text field and return true from its onEditorAction method, when actionId is equal to IME_ACTION_DONE This will prevent soft keyboard from hiding: EditText txtEdit = (EditText) findViewById(R.id. TxtEdit); txtEdit. SetOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.
IME_ACTION_DONE) { // your additional processing... return true; } else { return false; } } }).
Attach OnEditorActionListener to your text field and return true from its onEditorAction method, when actionId is equal to IME_ACTION_DONE. This will prevent soft keyboard from hiding: EditText txtEdit = (EditText) findViewById(R.id. TxtEdit); txtEdit.
SetOnEditorActionListener(new OnEditorActionListener() { public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo. IME_ACTION_DONE) { // your additional processing... return true; } else { return false; } } }).
Depending on your EditText android:imeOptions value, you may need to check actionId against IME_NULL, IME_ACTION_GO etc. – Idolon Aug 29 at 22:34 Tried it and it's working perfectly! – Redwarp Aug 31 at 9:26.
Well, I'm trying to prevent the soft keyboard from closing when the user press the "ok" button after editing a text field. Actually, what i'm trying to achieve is : when "ok" button is pressed, the field is parsed and if valid, it starts another activity. That is easy enough.
But, when the field is not valid, I want the soft keyboard to stay open. And that's... a hell more complicated. Thanks in advance.
EDIT : what I mean by the OK button is the OK button from the soft keyboard.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.