Last active
November 21, 2016 12:03
-
-
Save lsurvila/f821ae4c10313599419b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void setActionDoneListener(EditText editText, final ActionDoneListener editTextActionDoneListener) { | |
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() { | |
@Override | |
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |
if (actionId == EditorInfo.IME_ACTION_DONE) { | |
editTextActionDoneListener.onActionDone(); | |
return false; | |
} | |
return false; | |
} | |
}); | |
} | |
public interface ActionDoneListener { | |
void onActionDone(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment