Pull refresh sherlockfragment

109 views Asked by At

Good night everyone! I've added LoadMoreListView library to refresh my ListView inside a Sherlockfragment.

So far, this is the code for the ListView inside the OnCreate sherlockfragment

((PullAndLoadListView) (ListView) list)
    .setOnRefreshListener(new OnRefreshListener() {

        public void onRefresh() {

            new getAdvice().execute();
        }
    });

and on my task i have this.

@Override
    protected void onPostExecute(Void result) {
        super.onPostExecute(result);

        if (conductor != null) {
            adapter = new ListViewAdapterAdvice(getActivity(), driver,
                    address, date, free, price, flag); 

            list.setAdapter(adapter);
        }

        ((BaseAdapter) adapter).notifyDataSetChanged();
        ((PullAndLoadListView) list).onLoadMoreComplete();


    }

This works perfect the first time I pull to refresh (it DOES refresh the list) However, on the second it never gets into the AsyncTask to refresh the list....

Any Idea???? I'm pretty sure the "finish" state of the refresh have never finished on the first pull, but I don't know how to do it...

Hope you guys help me out.

Thank you so much!

0

There are 0 answers