I am changing the value of an EditText
on keyListener
.
But when I change the text the cursor is moving to the beginning of the EditText
.
I need the cursor to be at the end of the text.
How to move the cursor to the end of the text in a EditText
.
Try this:
i think this can achieve what you want.
There is a function called append for ediitext which appends the string value to current edittext value and places the cursor at the end of the value. You can have the string value as the current ediitext value itself and call append();
If you want to Place cursor at the end of text in EditText view
In my case I created the following kotlin ext. function, may be useful to someone
Then use as follows