No, setFocus() should not enable keyboard mode :) On Fri, Jan 9, 2009 at 10:44 AM, Ward Willats <goo...@wardco.com> wrote: > > So it was stupidity then! > > At onCreate() time, I was manually setting focus on the "OK" button > at the bottom of a scrolling setup screen. Removing that fixes. Thank > you very much. > > I am surprised that since I was causing this by calling setFocus(), > that the behavior doesn't happen in both touch-mode and > keyboard-mode. Should setFocus() enable keyboard mode? (I leave that > to the experts...) > > -- Ward > > > >>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 <goo...@wardco.com> 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 >>romain...@android.com >> >>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 >> >> > > > >
-- Romain Guy Android framework engineer romain...@android.com 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 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 -~----------~----~----~----~------~----~------~--~---