I'm trying to work out how to do this properly in Android: I have a
tall custom view embedded in a ScrollView. The custom view has a few
scattered "hot spots" that can receive focus. (So far, this is more or
less like the internal selection demo in ApiDemos.) I'd like the
following behavior: the view initially appears scrolled to the top. If
at least one hot spot is visible, the first one has focus. If the user
presses the down arrow and the next hot spot is also visible, transfer
focus without scrolling (or minor scrolling if partially visible);
otherwise, scroll in the ordinary manner of a ScrollView. If another
hot spot comes into view when scrolling, transfer focus to it.
Analogous behavior should happen with the up arrow.

The problem is that if I transfer focus in the manner of the internal
selection demo, scrolling will skip down the view until the next hot
spot is visible. I'd like it to scroll to intermediate positions where
there may be no hot spot visible.

I actually get more or less the behavior I want with a LinearLayout
inside a ScrollView when only some of the items are focusable.
(However, the LinearLayout comes up scrolled so the first focusable
child is visible.)

Thanks for any help with this!

Ted Hopp
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to