同步两个ListView控件位置控件、位置、两个、ListView

由网友(口出恶言)分享简介:我有两个列表视图。有没有什么办法,当我滚动列表中的任何一个同步列表视图的位置I have two ListViews. Is there any way to synchronize the position of ListViews when I scroll any one of the Lists推荐答案...

我有两个列表视图。有没有什么办法,当我滚动列表中的任何一个同步列表视图的位置

I have two ListViews. Is there any way to synchronize the position of ListViews when I scroll any one of the Lists

推荐答案

实现一个的 AbsListView.OnScrollListener ,注册到ListView。当ListView的滚动,OnScrollListener的onScroll()方法将被触发,然后调用 smoothScrollToPosition()在另一个的ListView 同步到相同的位置。

Implement an AbsListView.OnScrollListener, register to the ListView. When the ListView is scrolled, the onScroll() method of OnScrollListener will be triggered, then call smoothScrollToPosition() on another ListView to synchronize to the same position.

阅读全文

相关推荐

最新文章