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. 🙂
More Related Contents:
- I cannot change the inputType, hint anything for my EditText
- Last character taken twice by textwatcher
- How to stop EditText from gaining focus at Activity startup in Android
- Focusable EditText inside ListView
- How to show soft-keyboard when edittext is focused
- Put constant text inside EditText which should be non-editable – Android
- Outlined Edit Text from Material Design
- Disabling of EditText in Android
- How to create EditText with cross(x) button at end of it?
- Set Focus on EditText
- Android intercept paste\copy\cut on editText
- How to restrict the EditText to accept only alphanumeric characters
- Custom cut/copy action bar for EditText that shows text selection handles
- Change EditText hint color when using TextInputLayout
- How to change color / appearance of EditText select handle / anchor?
- Drawing multiple lines in edittext e.g. notepad
- Implementing Text Watcher for EditText
- Disable soft-keyboard from EditText but still allow copy/paste?
- How to make EditText not editable through XML in Android?
- EditText in Listview loses focus when pressed on Android 4.x
- Scrolling EditText inside ScrollView
- Android RecyclerView: Change layout file LIST to GRID onOptionItemSelected
- How to use EditText onTextChanged event when I press the number?
- Disable EditText context menu
- Allow multi-line in EditText view in Android?
- change font for editText hint
- How to exclude special characters from android keypad for EditText
- Focus on EditText in ListView when block descendants (Android)
- Android: Set Edit text or text view id Programmatically
- Android EditText on longPress: ArrayIndexOutOfBoundsException: length=15; index=491