zeal4android
for Android developers
Monday, April 9, 2012
Android EditText set cursor position to end
Set cursor to end:
EditText editText = (EditText)findViewById(R.id.
edit_text
);
editText.setSelection(editText.getText().length());
Set cursor to front:
EditText editText = (EditText)findViewById(R.id.
edit_text
);
editText.setSelection(0);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment