Check this code
actualListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
@Override
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
String label = DateUtils.formatDateTime(
getApplicationContext(), System.currentTimeMillis(),
DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_ABBREV_ALL);
// Update the LastUpdatedLabel
refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);
// Do work to refresh the list here.
if (GeneralClass.isNetworkAvailable(getApplicationContext())
&& GeneralClass.isHaveInternet) {
// start = start + 10;
new GetDataTask1(start, end).execute();
// new GetDataTask().execute();
} else {
Toast.makeText(getApplicationContext(),
"Internet connection not avilable",
Toast.LENGTH_SHORT).show();
}
}
});
您可以使用pulltorefreshlistview以獲得更多的數據,當您向下滾動 – Palak
我用來拉刷新。還有它再次顯示前10個記錄。 – venkateswaran
你可以發佈你的代碼嗎?可能不確定,但問題在於,當您調用Web服務 – Palak