4

ListView をプルダウンして解放する効果を適用する方法は、更新を行います。Facebook と同じように、プルダウンするとニュースフィードが更新されます。

4

1 に答える 1

2

これを使用して、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();
}
});
于 2012-10-19T12:21:12.423 に答える