开发者

Auto scroll down EditText

I have an Activity that consist in 3 buttons and a EditText, where I add (with EditText.append(String)) some text when the buttons are pressed... The problem is that i couldn't find the way to show the last text lines when they reach the lower limit of the EditText..

Sometimes it works, and the text go up as i add more text 开发者_StackOverflow中文版lines, but for example, when i touch the screen and move the EditText, it stays there..

The only "solution" that i found was the "scroller", but i don't understand how it works. Can anyone help me with this?

Thanks in advance.


It is not really the answer to the question, but for the ones that maybe have the same question as me:

I finally put a TextView in a ScrollView, and used the fullScroll(View.FOCUS_DOWN) functionality of the ScrollView.. This way i could see the end of the TextView.

I could do this because i didn't need to edit the text added.

Hope it helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜