让ListView记住上次滑动到的位置

int index = listView.getFirstVisiblePosition(); get

View v = listView.getChildAt(0); it

int top = (v == null) ? 0 : v.getTop(); io

listView.setSelectionFromTop(index, top); top

相关文章
相关标签/搜索