Maybe more of an FYI than a question, but in playing around with
setSelection() with an EditText, it appears that:

- setting the position to anything above 0 works as expected, i.e.
mText.setSelection(3) puts the cursor at position three, but;
- setting the position to 0, i.e. the top-left position of the text,
fails, instead placing the cursor at the end of the first line of
text.

.setSelection(3):
Lorum ipsum...
    ^

.setSelection(0):
Lorum ipsum...
                  ^

Anyone know of a way to have the cursor at position 0 when there is
existing text in the EditText, and maybe more importantly, any best
practices as to what a user would expect?  I have a large multi-line
EditText on a tablet, do I emulate Word and have the cursor at
position 0, or have the cursor at the end of line 1 as Android seems
to insist (which makes sense for a single-line EditText), or maybe at
the very end of the text, which could be way down on line n?  Having
the cursor at the end of line one of a multi-line entry seems to not
really help anyone.

Thanks for any thoughts,

Paul

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to