Created
July 21, 2015 03:43
-
-
Save brucetoo/a9e105c822a411149145 to your computer and use it in GitHub Desktop.
PullToRefresh自动刷新
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onResume() { | |
super.onResume(); | |
//自动刷新值需要在onResume方法中延迟执行 mPulltoRefreshView.setRefreshing(true) | |
mHandler.postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
mGridView.setRefreshing(true); | |
//异步执行加载数据任务 | |
//加载数据成功后,必须调用 mPullToRefreshView.onRefreshComplete() | |
} | |
}, 500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment