i have done in gridView ScrollListener but how to do in SherlockListFragment i want to create app like gmail mail list its refresh like Gmail ActionbarPullToRefresh and load more mail as gmail app
please help me thanks in advance
protected GridView gridView = (GridView) view.findViewById(R.id.gridview);
gridView.setOnScrollListener(new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
if (!loading
&& load(firstVisibleItem, visibleItemCount,
totalItemCount)) {
loading = true;
loadMore();
}
}
});
gridView.setOnItemClickListener(this);
Note: its ListFragment so i don't want to do like ListView listview= (Listview) view.findViewById(R.id.listview);