Android ListView下拉刷新

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23117731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 06:48:09  来源:igfitidea点击:

Android ListView Pull Down to Refresh

androidlistview

提问by user3141985

Is there any default function that exists like in iOS to update a listview ? Or any other library ?

是否存在像 iOS 中那样的默认函数来更新列表视图?或任何其他图书馆?

采纳答案by user3141985

@elimirks pointed me to correct direction for using ActionBar-PullToRefresh, but for being newbie I was getting a lot or errors and was not able to use it well until I found ActionBar Pull To Refresh Tutorial. To use ActionBar-PullToRefreshthe other library SmoothProgressBaris also required and need to be configured.

@elimirks 为我指出了使用ActionBar-PullToRefresh 的正确方向,但作为新手,我遇到了很多错误,并且在我找到ActionBar Pull To Refresh Tutorial之前无法很好地使用它。使用ActionBar-PullToRefresh其他库SmoothProgressBar也是必需的,需要进行配置。

Thanks.

谢谢。

回答by Distwo

This is now supported by the support library and called swipeRefreshLayout

这现在由支持库支持并称为 swipeRefreshLayout

https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html

https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html

And here is an example: http://antonioleiva.com/swiperefreshlayout/

这是一个例子:http: //antonioleiva.com/swiperrefreshlayout/