Any reason you can't use a single ListView with appropriate item
layouts, split in two halves?
Other than that, the scroll position is accessible via the base class,
View. It has getScrollX() and getScrollY() methods.
You could also override the following in both ListViews (subclassing them):
http://developer.android.com/reference/android/view/View.html#onScrollChanged(int,
int, int, int)
-- Kostya
23.04.2011 0:55, lbendlin пишет:
I have two narrow, equally sized listviews side by side. I chose that
design specifically because it's not a lot of information and I can
show most of the contents in one screen full (together both lists have
22 items)
As it is now, each list is scrolling independently. It's ok-ish but I
would like to scroll them at the same time, no matter which of the two
lists I touch.
Telling a list to scroll to a particular pixel (or dp?) position is
easy - smoothScrollTo(x,y).
http://developer.android.com/reference/android/widget/ScrollView.html#smoothScrollTo%28int,%20int%29
However I have a hard time to find out the current scroll position of
a list view (in particular the y value). Can you please suggest where
to look?
--
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
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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