程序中通过按钮进行翻页,向下翻页在list的底端,翻页后,不能自动回到顶部,于是这样滴实现:
adapter.notifyDataSetChanged();
if (!resultListView.isStackFromBottom()) {
resultListView.setStackFromBottom(true);
}
resultListView.setStackFromBottom(false);
setStackFromBottom :
When stack from bottom is set to true, the list fills its content starting from the bottom of the view.
本文介绍了一种在使用按钮翻页后使列表视图自动返回到顶部的方法。通过设置`setStackFromBottom`属性,可以确保翻页操作完成后列表重新定位到起始位置。
440

被折叠的 条评论
为什么被折叠?



