I have created one keyboard.When user enter numbers , its entering particular EditText.But When User click on Done
key, it didn\'t go to setOnEditorActionList
Try this for adding Listener :
msg_title_text.setOnEditorActionListener(new DoneOnEditorActionListener());
Created a class :
class DoneOnEditorActionListener implements OnEditorActionListener {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
Log.v("*****************************", "Clicke da machan");
// Do your Stuffs
return true;
}
return false;
}
}
if you wanna got the actionid try this way:
in my project i change the edittext's properties like that
input type ----- text
ime options ----- actionDone
and in java file:
etSearch = (EditText) findViewById(R.id.etSearch); etSearch.setOnEditorActionListener(mEditorActionListener);
private OnEditorActionListener mEditorActionListener = new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
// TODO Auto-generated method stub
if (actionId == EditorInfo.IME_ACTION_DONE) {
//do something
}
return false;
}
};
in this way could got the actionid = 6;