Search in sources :

Example 1 with BaseRecyclerView

use of com.android.launcher3.BaseRecyclerView in project android_packages_apps_Launcher3 by crdroidandroid.

the class RecyclerViewFastScroller method setRecyclerView.

public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
    if (mRv != null && mOnScrollListener != null) {
        mRv.removeOnScrollListener(mOnScrollListener);
    }
    mRv = rv;
    mRv.addOnScrollListener(mOnScrollListener = new RecyclerView.OnScrollListener() {

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            mDy = dy;
            // TODO(winsonc): If we want to animate the section heads while scrolling, we can
            // initiate that here if the recycler view scroll state is not
            // RecyclerView.SCROLL_STATE_IDLE.
            mRv.onUpdateScrollbar(dy);
        }
    });
    mPopupView = popupView;
    mPopupView.setBackground(new FastScrollThumbDrawable(mThumbPaint, Utilities.isRtl(getResources())));
}
Also used : FastScrollThumbDrawable(com.android.launcher3.graphics.FastScrollThumbDrawable) RecyclerView(androidx.recyclerview.widget.RecyclerView) BaseRecyclerView(com.android.launcher3.BaseRecyclerView)

Example 2 with BaseRecyclerView

use of com.android.launcher3.BaseRecyclerView in project android_packages_apps_Launcher3 by ArrowOS.

the class RecyclerViewFastScroller method setRecyclerView.

public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
    if (mRv != null && mOnScrollListener != null) {
        mRv.removeOnScrollListener(mOnScrollListener);
    }
    mRv = rv;
    mRv.addOnScrollListener(mOnScrollListener = new RecyclerView.OnScrollListener() {

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            mDy = dy;
            // TODO(winsonc): If we want to animate the section heads while scrolling, we can
            // initiate that here if the recycler view scroll state is not
            // RecyclerView.SCROLL_STATE_IDLE.
            mRv.onUpdateScrollbar(dy);
        }
    });
    mPopupView = popupView;
    mPopupView.setBackground(new FastScrollThumbDrawable(mThumbPaint, Utilities.isRtl(getResources())));
}
Also used : FastScrollThumbDrawable(com.android.launcher3.graphics.FastScrollThumbDrawable) RecyclerView(androidx.recyclerview.widget.RecyclerView) BaseRecyclerView(com.android.launcher3.BaseRecyclerView)

Example 3 with BaseRecyclerView

use of com.android.launcher3.BaseRecyclerView in project android_packages_apps_404Launcher by P-404.

the class RecyclerViewFastScroller method setRecyclerView.

public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
    if (mRv != null && mOnScrollListener != null) {
        mRv.removeOnScrollListener(mOnScrollListener);
    }
    mRv = rv;
    mRv.addOnScrollListener(mOnScrollListener = new RecyclerView.OnScrollListener() {

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            mDy = dy;
            // TODO(winsonc): If we want to animate the section heads while scrolling, we can
            // initiate that here if the recycler view scroll state is not
            // RecyclerView.SCROLL_STATE_IDLE.
            mRv.onUpdateScrollbar(dy);
        }
    });
    mPopupView = popupView;
    mPopupView.setBackground(new FastScrollThumbDrawable(mThumbPaint, Utilities.isRtl(getResources())));
}
Also used : FastScrollThumbDrawable(com.android.launcher3.graphics.FastScrollThumbDrawable) RecyclerView(androidx.recyclerview.widget.RecyclerView) BaseRecyclerView(com.android.launcher3.BaseRecyclerView)

Example 4 with BaseRecyclerView

use of com.android.launcher3.BaseRecyclerView in project Neo-Launcher by NeoApplications.

the class RecyclerViewFastScroller method setRecyclerView.

public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
    if (mRv != null && mOnScrollListener != null) {
        mRv.removeOnScrollListener(mOnScrollListener);
    }
    mRv = rv;
    mRv.addOnScrollListener(mOnScrollListener = new RecyclerView.OnScrollListener() {

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            mDy = dy;
            // TODO(winsonc): If we want to animate the section heads while scrolling, we can
            // initiate that here if the recycler view scroll state is not
            // RecyclerView.SCROLL_STATE_IDLE.
            mRv.onUpdateScrollbar(dy);
        }
    });
    mPopupView = popupView;
    mPopupView.setBackground(new FastScrollThumbDrawable(mThumbPaint, Utilities.isRtl(getResources())));
}
Also used : FastScrollThumbDrawable(com.android.launcher3.graphics.FastScrollThumbDrawable) BaseRecyclerView(com.android.launcher3.BaseRecyclerView) RecyclerView(androidx.recyclerview.widget.RecyclerView)

Example 5 with BaseRecyclerView

use of com.android.launcher3.BaseRecyclerView in project android_packages_apps_Trebuchet by LineageOS.

the class RecyclerViewFastScroller method setRecyclerView.

public void setRecyclerView(BaseRecyclerView rv, TextView popupView) {
    if (mRv != null && mOnScrollListener != null) {
        mRv.removeOnScrollListener(mOnScrollListener);
    }
    mRv = rv;
    mRv.addOnScrollListener(mOnScrollListener = new RecyclerView.OnScrollListener() {

        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            mDy = dy;
            // TODO(winsonc): If we want to animate the section heads while scrolling, we can
            // initiate that here if the recycler view scroll state is not
            // RecyclerView.SCROLL_STATE_IDLE.
            mRv.onUpdateScrollbar(dy);
        }
    });
    mPopupView = popupView;
    mPopupView.setBackground(new FastScrollThumbDrawable(mThumbPaint, Utilities.isRtl(getResources())));
}
Also used : FastScrollThumbDrawable(com.android.launcher3.graphics.FastScrollThumbDrawable) BaseRecyclerView(com.android.launcher3.BaseRecyclerView) RecyclerView(androidx.recyclerview.widget.RecyclerView)

Aggregations

RecyclerView (androidx.recyclerview.widget.RecyclerView)7 BaseRecyclerView (com.android.launcher3.BaseRecyclerView)7 FastScrollThumbDrawable (com.android.launcher3.graphics.FastScrollThumbDrawable)7