Android EditText listener for cursor position change

Just subclass or extend the class EditText and add the following code to the newly create class:

 @Override 
 protected void onSelectionChanged(int selStart, int selEnd) {
        // Do ur task here.
    }

Don’t forget to add constructors to the subclass. 🙂

Leave a Comment