Ok, i've found some kind of weird solution...

It seems that fullScroll is inversed. As i wanted to go to the top of my
view i need to call
scrollView.fullScroll(
>
> ScrollView.FOCUS_DOWN);


and to go to the bottom :
 scrollView.fullScroll(
>
> ScrollView.FOCUS_UP);


... weird... but that's working...

Arnaudweb


2009/4/19 Arnaudweb <arnaud...@gmail.com>

>
> Hello,
>
> I've the same problem. my scrollView contains a LinearLayout that is
> almost empty at the beginning. Then i fill it with other views and try
> immediately after to use
>
> scrollView.fullScroll(ScrollView.FOCUS_UP);
>
> This is not working...
>
> I'm guessing my fullScroll setting is executed before that my
> scrollView take my changes with its child in account.
>
> Has someone faced the same pbm?
>
> Do you have any solution with that?
>
> Thanks
>
>
> On 3 avr, 19:04, droozen <droozenr...@gmail.com> wrote:
> > So, I have aScrollViewwith a single TextView inside it. Upon initial
> > startup I set the text of the text view to an internally stored string
> > and try:
> >
> > ScrollViewmyScroll = (ScrollView) findViewById(R.id.my_scroll_id);
> > myScroll.fullScroll(ScrollView.FOCUS_DOWN);
> >
> > No scrolling happens. (The string is long. I want to show the end of
> > it. Instead, at this point, view remains at the top.)
> >
> > Now I append a few more lines to the text, set the TextView's text to
> > the new text, and perform the samefullScroll(ScrollView.FOCUS_DOWN)
> > function. It now scrolls, but to the end. For example, if the last
> > part of the text is:
> >
> > 5
> > +
> > 5
> > =
> > 10
> >
> > After programmatically scrolling down I see:
> >
> > 5
> > +
> >
> > I have to manually scroll to see the end.
> >
> > Am I doing something wrong? How can I reliably get the scroll to show
> > the end of the text?
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to