You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added my custom OnScrollListener which is AbsListView.OnScrolllistener on HeaderListView ,because its own onscrolllistener is required for minimum Api LEVEL 23(my minimum is 15).
It is forcing the section headers scrolling.I want to fix the sectional headrers.Kindly give me some advice.
Below is my custom implementation:-
MyClass implements AbsListView.OnScrollListener
{ @Bind(R.id.receipt_list)
HeaderListView mReceiptsList;
@OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
this.currentScrollState = scrollState;
this.isScrollCompleted();//the method to detect scroll completion
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
this.currentFirstVisibleItem = firstVisibleItem;
this.currentVisibleItemCount = visibleItemCount;
this.totalItemCount = totalItemCount;
}
/***By this methos I detect if there's been a scroll which has completed***/
private void isScrollCompleted() {
if (this.currentVisibleItemCount > 0 && this.currentScrollState == SCROLL_STATE_IDLE && this.totalItemCount == (currentFirstVisibleItem + currentVisibleItemCount)) {
if(canLoad) { //class variables to manipulate the data
pageNumber =pageNumber +1;
refreshScreen();
}
}
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I have added my custom OnScrollListener which is AbsListView.OnScrolllistener on HeaderListView ,because its own onscrolllistener is required for minimum Api LEVEL 23(my minimum is 15).
It is forcing the section headers scrolling.I want to fix the sectional headrers.Kindly give me some advice.
Below is my custom implementation:-
MyClass implements AbsListView.OnScrollListener
{
@Bind(R.id.receipt_list)
HeaderListView mReceiptsList;
@OverRide
public void onScrollStateChanged(AbsListView view, int scrollState) {
this.currentScrollState = scrollState;
this.isScrollCompleted();//the method to detect scroll completion
}
}
The text was updated successfully, but these errors were encountered: