android next key

Solutions on MaxInterview for android next key by the best coders in the world

showing results for - "android next key"
Cameron
14 Mar 2017
1import android.view.inputmethod.EditorInfo;
2import android.widget.TextView;
3
4Context context = this;
5
6TextView.OnEditorActionListener editListener = new TextView.OnEditorActionListener() {
7  @Override
8  public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
9    if (actionId == EditorInfo.IME_ACTION_NEXT) {
10      Toast.makeText(context, "next", Toast.LENGTH_SHORT).show();
11    }
12    if (actionId == EditorInfo.IME_ACTION_DONE) {
13      Toast.makeText(context, "done", Toast.LENGTH_SHORT).show();
14    }
15    return false;
16  }
17};
18
19nameEdit.setOnEditorActionListener(editListener);