android-widget-keyboardless-edittext
android-widget-keyboardless-edittext copied to clipboard
Update cursor position
Ensure cursor is placed at the end rather than the front.
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()
..
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.
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.