Oh dear...
I should have tried that first. It works beautifully!
Thanks very much skink. I wasn't able to get the Selection.SetSelection
to work even if I posted it later. There's obviously something I don't
quite understand about how all of this works. - Like why I need to put a
TextView that supports scrolling inside a scrollview to do this
anyway... :S
After experimenting a bit more I was only able to get the following 2
commands to work:
sv.post(new Runnable() {
public void run() {
sv.scrollTo(0, tv.getHeight());
}
});
And
sv.post(new Runnable() {
public void run() {
sv.fullScroll(ScrollView.FOCUS_DOWN);
}
});
Thanks skink & Raphael
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of skink
Sent: Thursday, 28 May 2009 6:52 PM
To: Android Developers
Subject: [android-developers] Re: Extremely frustrating = TextView in
ScrollView -> Scroll to bottom?
On 28 Maj, 01:28, "Peter Carpenter"
<[email protected]> wrote:
> Hi guys,
>
>
> It appears that plenty of people have asked about this in newsgroups,
> but no solution offered.
>
> textView.setText(s);
>
try:
tv.setText(s);
sv.post(new Runnable() {
void run() {
sv.scrollTo(0, yPosition);
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---