Android下拉刷新上拉加载源码
Android下拉刷新上拉加载源码 ....... @Override public void onRefresh() { mHandler.postDelayed(new Runnable() { @Override public void run() { start = ++refreshCnt; items.clear(); geneItems(); // mAdapter.notifyDataSetChanged(); mAdapter = new ArrayAdapter(XListViewActivity.this, R.layout.list_item, items); mListView.setAdapter(mAdapter); onLoad(); } }, 2000); } @Override public void onLoadMore() { mHandler.postDelayed(new Runnable() { @Override public void run() { ge neItems(); mAdapter.notifyDataSetChanged(); onLoad(); } }, 2000); } neItems(); mAdapter.notifyDataSetChanged(); onLoad(); } }, 2000); }
用户评论