Manually, that's probably a matter of: -- setting the focus when you switch pages -- using android:nextFocusDown and kin on your widgets to control how the focus switches
(note that I haven't used the pager component yet, so the above advice is an educated guess) However, bear in mind that not everybody uses touchscreens. If you make it impossible to navigate through all fragments with the pointing device, you will alienate those users. On Thu, Sep 22, 2011 at 8:25 AM, Eric Carman <[email protected]> wrote: > Using the compatibility library with the Fragment Pager Support > example, I'm noticing some odd behavior in the scrolling. > > To reproduce: > > 1. Run the sample FragmentPagerSupport (v4) > 2. From Fragment #1 scroll up and down using the dpad or trackball. > - This works as expected. > 3. Swipe to move to Fragment #2. > 4. Scroll up and down using the dpad or trackball. > > Nothing appears to happen. However, you are actually scrolling on > Fragment #1. Not the visible fragment. In fact, you can use the left/ > right arrows (trackball roll left/right) to move the focus to the > offscreen fragments and scroll around on those. > > If you connect an item click listener to the lists and display a toast > message, you will see that while scrolling on the off-screen > fragments, pressing the dpad-center or trackball, you will trigger the > click response for that offscreen list item. > > I noticed this in my own application and confirmed with the sample > app. > > Is there any way around this? Can we restrict focus/scrolling only to > the onscreen fragment? > > Thank you. > > Best Regards, > Eric > > -- > 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 > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

