Horje
android action key Code Example
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);
android action key

editText.setOnEditorActionListener(new OnEditorActionListener() {        
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
        if(actionId==EditorInfo.IME_ACTION_DONE){
            //do something
        }
    return false;
    }
});





Java

Related
java instance of a class Code Example java instance of a class Code Example
can we create an object of interface in java Code Example can we create an object of interface in java Code Example
how to navigate to last back stack in android studio Code Example how to navigate to last back stack in android studio Code Example
java random between Code Example java random between Code Example
play ringtone android in infinite loop Code Example play ringtone android in infinite loop Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7