问题
I'm looking for a way to detect a cursor position changed in an EditText. I couldn't find anything in the documentation so far. Has anyone solved this already?
回答1:
You can override onSelectionChanged (int selStart, int selEnd) to get notified about selection changes. If the cursor is moved, this is called as well (in this case selStart == selEnd)
来源:https://stackoverflow.com/questions/3652569/android-edittext-listener-for-cursor-position-change