editTextView.setOnEditorActionListener(new 
EditText.OnEditorActionListener(){
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event){
if(actionId == EditorInfo.IME_ACTION_DONE){
//save stuff
}
return false;
}
});

Do notice that there's no way of knowing if the keyboard was closed using 
the Back hardware button.
you should probably do the "save stuff" code on every text change instead.

On Monday, July 16, 2012 10:49:16 AM UTC+3, Henry Nguyen wrote:
>
> My note application have 2 fragments on a screen : A list of notes 
> fragment and a note detail fragment to display the selected note in the 
> second fragment , it has an input text 
> field(android:inputType="textMultiLine"). As i want handle event keyboard 
> hidden so i can save the change user has made when he/she close the 
> keyboard . Can anyone give me a clue to done this task ? 
> note:The text field is Multiline so i can't set 
> it android:imeOptions="actionDone" to handle it normally.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to