android-widget-keyboardless-edittext icon indicating copy to clipboard operation
android-widget-keyboardless-edittext copied to clipboard

Update cursor position

Open r2DoesInc opened this issue 10 years ago • 3 comments

Ensure cursor is placed at the end rather than the front.

r2DoesInc avatar Aug 27 '14 14:08 r2DoesInc

I've looked at the pull request and tested it, but in addition to placing the cursor at the end, the new addition prevents highlighting on my device (Nexus 4 stock Android 4.4.2) unfortunately, which is a regress from what an EditText would do. What's the exact problem you've experience? Just the cursor being in the front when the app is started? If that is just the case, then we could add a setSelection(getText().length()); at the end of initialize()..

danialgoodwin avatar Aug 27 '14 18:08 danialgoodwin

Hm, you are right. In my case the selection isnt needed so i didnt think to check.

initialize wont cut it, you will need to update it on every keystroke.

r2DoesInc avatar Aug 27 '14 20:08 r2DoesInc

The goal for this KeyboardEditText is to be as much like EditText as possible. And, in a default EditText, users can input text at any location (not just at the end). But, it is a useful snippet of code that would definitely work for some more specific use cases. Would you like to make a new section at the bottom of the README file for the snippet with more comments for its uses and limitations? Or, I can do it if you'd like.

danialgoodwin avatar Aug 27 '14 20:08 danialgoodwin