Just implement the following line of code for listview
listView.setOnScrollListener(new OnScrollListener() {
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCoun) {
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState != 0)
listView.getAdapter()).isScrolling = true;
else {
listView.getAdapter()).isScrolling = false;
listView.getAdapter()).notifyDataSetChanged();
}
}
});
listView.setOnScrollListener(new OnScrollListener() {
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCoun) {
public void onScrollStateChanged(AbsListView view, int scrollState) {
if (scrollState != 0)
listView.getAdapter()).isScrolling = true;
else {
listView.getAdapter()).isScrolling = false;
listView.getAdapter()).notifyDataSetChanged();
}
}
});
No comments:
Post a Comment