Android - scroll listener for Staggered grid view

555 Views Asked by At

i have used scroll listener for gridview, i need to use the same one for staggered gridview, but if i use this below code, onscroll method was not called during execution

@Override
    public void onScroll(AbsListView arg0, int firstVisibleItem,
            int visibleItemCount, int totalItemCount) {
        if (loading) {
            if (totalItemCount > previousTotal) {
                loading = false;
                previousTotal = totalItemCount;
                currentPage++;
            }
        }

        if (!loading
                && (totalItemCount - visibleItemCount) <= (firstVisibleItem + visibleThreshold)) {

            new homePageLoadImages().execute(currentPage);
            loading = true;
        }
    }

Please give me suggestions how to use this for staggered griview

0

There are 0 best solutions below