Android: EditText listener for cursor position change [duplicate]

◇◆丶佛笑我妖孽 提交于 2019-12-08 09:54:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!