I have two ListViews
. Is there any way to synchronize the position of ListViews
when I scroll any one of the Lists. Im implementing an AbsListView.OnScrollListener
, registering to the ListView
. When the ListView
is scrolled, the onScroll()
method of OnScrollListener
will be triggered, then i call `smoothScrollToPosition()'. But it doent work properly. Can someone provide me any code example for this?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
If the position is visible smoothScrollToPosition() won't scroll. You can thought use scrollTo or scrollBy on the other list that is not scrolling at the moment, but be careful to not enter a recursion with each list calling the other to scroll.
Here is a working code sample of what nininho is suggesting
MainActivity
the XML