I'm trying implement "pull to refresh" on a ListFragment but right now none of the drop in libraries seem to support it. There's no way to detect overscroll on the list fragment that I can see so I'm wondering if anyone has found a means to get this working?
--
Using Christian's tip I used the following for my onCreateView() method.
@Override
public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
PullToRefreshListView listView = new PullToRefreshListView(getActivity());
mAdapter = new HomeTweetListAdapter(getActivity(), R.layout.tweet_list_item, tweets);
listView.setAdapter(mAdapter);
return listView;
}
Like Christian said you can only do this with a Fragment. Returning anything other than a ListView on a ListFragment errors out.
EDIT: To clarify I am using Johan's PullToRefresh library