android-Ultra-Pull-To-Refresh icon indicating copy to clipboard operation
android-Ultra-Pull-To-Refresh copied to clipboard

上拉加载更多之后怎么滑倒底部啊,一直不行啊,用recyclerview的smothto

Open wudaotiantian opened this issue 6 years ago • 3 comments

wudaotiantian avatar Aug 26 '17 04:08 wudaotiantian

https://github.com/alibaba/vlayout/issues/187

看看这个吧

  @Override
    protected int getVerticalSnapPreference() {
        return SNAP_TO_START;
    }

可能有个 SNAP_TO_END 什么的

iielse avatar Sep 11 '17 07:09 iielse

实现了支持所有View 的上拉加载 https://github.com/zhangman523/LoadMoreViewLayout

zhangman523 avatar Jan 02 '18 07:01 zhangman523

Try this

mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
    @Override
    public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
        // TODO Auto-generated method stub
        //super.onScrollStateChanged(recyclerView, newState);
        int firstPos = mLayoutManager.findFirstCompletelyVisibleItemPosition();
        if (firstPos > 0) {
            ptrFrameLayout.setEnabled(false);
        } else {
            ptrFrameLayout.setEnabled(true);
        }
    }

    @Override
    public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
        super.onScrolled(recyclerView, dx, dy);
    }
});

timi-codes avatar May 30 '18 14:05 timi-codes