Synchronize two ListView positions

后端 未结 2 1696
自闭症患者
自闭症患者 2021-02-10 15:29

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

2条回答
  •  爱一瞬间的悲伤
    2021-02-10 16:04

    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.

提交回复
热议问题