It's probably because you have a focusable item at the bottom of your
ScrollView. Which means that when you launch the ScrollView, the
framework looks for an item to give focus to, which causes the
ScrollView to scroll.

On Fri, Jan 9, 2009 at 9:08 AM, Ward Willats <[email protected]> wrote:
>
> On the G1.
>
> I have a pre-rotated activity (via android:screenOrientation="portrait").
>
> It contains a ScrollView with a linear layout child. The XML sets
> scrollX="0dip" and scrollY="0dip" (although I assume this is the
> default anyway).
>
> I launch this activity via a button in another activity.
>
> If I press the button with my finger, the activity with the
> ScrollView comes up as expected, scrolled to the top (0,0).
>
> If I press the button with the G1 track ball, the activity with the
> ScrollView comes up scrolled all the way to the bottom.
>
> Smells like a bug to me, but...
>
> Attempts to force the scroll to the top in Java at onCreate() or
> onResume() time do nothing (although the view scrolls fine with a
> finger or trackball focus changes once it is up).
>
> What say the assembly?
>
> Thanks
>
> -- Ward
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to