recyclerview 滚动状态

来源:互联网 发布:mac设置邮箱无法验证 编辑:程序博客网 时间:2024/06/08 07:51

RecyclerView 有三种滚动状态:

第一种:静止状态,滚动结束后回到此状态

/**
     * The RecyclerView is not currently scrolling.
     * @see #getScrollState()
     */
    public static final int SCROLL_STATE_IDLE = 0;

第二种:拖动状态,手指按在屏幕上拖动时的状态
    /**
     * The RecyclerView is currently being dragged by outside input such as user touch input.
     * @see #getScrollState()
     */
    public static final int SCROLL_STATE_DRAGGING = 1;

第三种:滑行状态,手指已离开屏幕,但仍在滚动的状态
    /**
     * The RecyclerView is currently animating to a final position while not under
     * outside control.
     * @see #getScrollState()
     */
    public static final int SCROLL_STATE_SETTLING = 2;



0 0