我正在使用 MergeAdapter(来自 Mark Murphy 的优秀系列项目)。您将它与 ListView 一起使用。我试图在刷新时重建适配器的内容(而不是“就地”刷新并调用 notifyDataSetChange())。
我想获取 ListView 的 y-scroll 值,这样我可以在重建列表后重置为该值。这似乎不可能?
谢谢
最佳答案
为您的 ListView 实现 OnScrollListener。
@Override
public void onScroll(AbsListView absListView, int firstVisible, int visibleCount, int totalCount) {
//firstvisible is your first visible item in the list
}
关于android - ListView 获取滚动位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10865150/