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

CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout+ViewPager问题

Open douya40 opened this issue 7 years ago • 5 comments

CoordinatorLayout+AppBarLayout+CollapsingToolbarLayout+ViewPager 使用最新控件做上滑悬浮,当将列表上滑广告位消失。在做下拉,列表广告位消失,只有悬浮位置下拉刷新,出现显示不全问题

douya40 avatar Dec 26 '16 02:12 douya40

我的也是,CoordinatorLayout+AppBarLayout+下拉刷新(Recyclerview),上滑隐藏了toolbar后就滑不出来了 swiperefreshlayout不会出这种问题,大神快出来解决一下

fzhengx avatar Mar 10 '17 13:03 fzhengx

试试extends PtrFrameLayout implements NestedScrollingChild, NestedScrollingParent

bestbobgit avatar Mar 30 '17 08:03 bestbobgit

我用的这种方式 appBarLayout = (AppBarLayout) mView.findViewById(R.id.layout_appbar);

    appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() {
        @Override
        public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
            if (verticalOffset >= 0) {
                checkContentCanBePulledDown = true;
            } else {
                checkContentCanBePulledDown = false;
            }
        }
    });

   @Override
        public boolean checkCanDoRefresh(PtrFrameLayout frame, View content, View header) {
            return checkContentCanBePulledDown;
        }

zhangdongsheng2 avatar Apr 18 '17 05:04 zhangdongsheng2

我基于该项目写了一个支持NestedScroll特性的下拉刷新库https://github.com/dkzwm/SmoothRefreshLayout ,你可以试用下。谢谢

dkzwm avatar Jun 07 '17 09:06 dkzwm

@zhangdongsheng2 在此基础上还应加上ScrollableLayout的判断,不然还有事件冲突

            public boolean checkCanDoRefresh(PtrFrameLayout frame, View content, View header) {
                return checkContentCanBePulledDown && mScrollableLayout.canPtr();
           }

oyty avatar Jul 25 '18 02:07 oyty