Code example for AbsListView.OnScrollListener

Methods: onScroll

0
            int totalItemCount) {
 
        updateStickyHeader(firstVisibleItem);
 
        if (mListener != null) {
            mListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);
        } 
    } 
 
    /** 
     * Sets a separator below the sticky header, which will be visible while the sticky header 
     * is not scrolling up. 
     * @param color - color of separator 
     * @param width - width in pixels of separator 
     */ 
    public void setHeaderSeparator(int color, int width) {
        mSeparatorView = new View(mContext);
        ViewGroup.LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,
                width, Gravity.TOP);
        mSeparatorView.setLayoutParams(params);
        mSeparatorView.setBackgroundColor(color);