4
如何應用拉下ListView的效果並釋放它,它會刷新。 與Facebook相同,當拉下它時,它將刷新NewsFeeds。刷新適配器拉動ListView Android
如何應用拉下ListView的效果並釋放它,它會刷新。 與Facebook相同,當拉下它時,它將刷新NewsFeeds。刷新適配器拉動ListView Android
可以使用this在Android的創造這樣的名單。
你必須使用刷新監聽器代碼爲:
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();
}
});