我已经在gridView ScrollListener中完成了但是如何在SherlockListFragment中完成 我想创建像Gmail邮件列表的应用程序 它像Gmail ActionbarPullToRefresh一样刷新并加载更多邮件作为gmail app
请提前帮助我
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);
注意:它的ListFragment所以我不想像ListView listview =(Listview)view.findViewById(R.id.listview);