How to apply effect of pulling down ListView and on releasing it, it will do refresh. same as Facebook, when pulling down it, it will refresh the NewsFeeds.
Asked
Active
Viewed 2,905 times
1 Answers
2
You can use this for creating such list in android.
You have to use the refresh listener in the code as:
PullToRefreshListView listView = (PullToRefreshListView) findViewById(R.id.pull_to_refresh_listview);
listView.setOnRefreshListener(new OnRefreshListener() {
public void onRefresh() {
// Your code to refresh the list contents
// ...
// Make sure you call listView.onRefreshComplete()
// when the loading is done. This can be done from here or any
// other place, like on a broadcast receive from your loading
// service or the onPostExecute of your AsyncTask.
listView.onRefreshComplete();
}
});

AppMobiGurmeet
- 719
- 3
- 6