[英]Swipe Refresh Layout retry progress bar after (x) minutes
I read documentation of SwipeRefreshLayout
but couldn't find any method for RetryPolicy
.我阅读了SwipeRefreshLayout
文档,但找不到RetryPolicy
任何方法。 I want SwipeRefreshLayout to show retry in progressbar
if data isn't fetched in 5 seconds.如果 5 秒内未获取数据,我希望 SwipeRefreshLayout 在progressbar
条中显示重试。
Any guideliness任何指导方针
As @Wizard said, you can do it something like this.正如@Wizard 所说,你可以这样做。
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
if(data_isnt_fetched){
//Fetch data again
}
}
}, 5000); //5sec
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.