Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android action key

TextView.OnEditorActionListener editListener = 
	(TextView view, int actionId, KeyEvent event) -> {
        if (actionId == EditorInfo.IME_ACTION_NEXT) {
          Toast.makeText(this, "next", Toast.LENGTH_SHORT).show();
        }
        if (actionId == EditorInfo.IME_ACTION_DONE) {
          Toast.makeText(this, "done", Toast.LENGTH_SHORT).show();
        }
        return false;
	};

editView.setOnEditorActionListener(editListener);
 
PREVIOUS NEXT
Tagged: #android #action #key
ADD COMMENT
Topic
Name
9+1 =