开发者

Cursor should appear from start in editText in android

开发者 https://www.devze.com 2023-04-10 13:43 出处:网络
I have a screen which have editText and a button, now when we click on the button it will fetch the Text from another screen and set to the editText.

I have a screen which have editText and a button, now when we click on the button it will fetch the Text from another screen and set to the editText. The problem is when the text has been set to edittext cursor position is coming at last. I want that cursor position should appear from start.

Any Idea?? Thank开发者_如何学Pythons.


MODIFIED

editText.requestFocus();
editText.setSelection(0);
0

精彩评论

暂无评论...
验证码 换一张
取 消