Henrik
Henrik

Reputation: 1995

How to set text position programmatically in EditText class?

Does smomeone know how I set the scrollbar position in an EditView programmatically.

I'm appending the text during special events but I want the EditView to scroll down to the latest text added so it'll be visible. But default the scrollbar does not move automatically when appending text.

/ Henrik

Upvotes: 2

Views: 1603

Answers (1)

anon
anon

Reputation:

Just call yourEditText.scrollBy(int x, int y) after you added text to your EditText. Maybe you have to test some values until you find the appropriate values

Upvotes: 1

Related Questions