Can someone please provide a solution to get a working listener for the soft-keyboard DONE
button, and/or explain what I\'m doing wrong in my current approach?<
Try this,
((EditText) findViewById(R.id.comment_text)).setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (event != null && (actionId == EditorInfo.IME_ACTION_GO
|| event.getKeyCode() == event.KEYCODE_ENTER))
{
//do whatever you want
}
}
});