siberiadante / multiscrolldemo Goto Github PK
View Code? Open in Web Editor NEWNestedScrollView+ViewPager+RecyclerView+SmartRefreshLayout 打造酷炫下拉视差效果并解决各种滑动冲突
License: Apache License 2.0
NestedScrollView+ViewPager+RecyclerView+SmartRefreshLayout 打造酷炫下拉视差效果并解决各种滑动冲突
License: Apache License 2.0
滑动一部分(不是最上面)滑动viewpager,会自动滑动到顶端。
测试的话把这个高度改一下(200dp)就可以复现
`<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapse"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
app:titleEnabled="false">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_gravity="bottom"
android:layout_marginTop="200dp"
android:gravity="center_horizontal"
android:orientation="vertical"
>`
在头布局(个人信息那块)未完全展开或者缩起的时候 子RecycleView在某种情况就可以来回滑动。
尝试分上拉 和下滑 根据头是否完全缩起 和子RecycleView是否滚动到顶部 RecycleView 和ScrollView来回交接控制权,但是技术太烂 没实现。而且由于隔了一层Viewpager还有外部 是否到顶 和头是否缩起的原因 感觉代码很乱。能否解决下~
先谢谢了 我的项目结构和你基本一致 ,有问题请教一下,当mScrollView.setNeedScroll(false); 设置为false后 ,onScrollChange 都不再回调了 ,下次设置setNeedScroll(true) 怎么触发的 ,你的demo是好的 但我这边有问题,找不到原因
windowManager.getDefaultDisplay().getMetrics(dm); 改为getRealMetrics(dm)这样不管虚拟导航栏,屏幕高度都是一样的了。
在头部用力滑动下,惯性滑动不能传递到RecyclerView上,也就是说到 动态,文章,问答这一行就会停止了
您好,现实中大部分的时候都是在Fragment 中,但是我移植都Fragment 中的时候就不行了。能看看什么问题吗
那么大佬,这个问题是由谁解决?
这个的处理方式还是有缺陷的,给大家推荐一个比较叼的案例:
https://github.com/JmStefanAndroid/EasyBehavior
但是这个方案也有些bug,比如,不能动态改变布局高度、控件gone之类的
动态文章和问答三个tab那里建议增加自动吸顶功能, 使滑动过渡更流畅
另外有个地方需要改进一下, 目前的标签页pin在toolbar下面之后, 从上往下滑动拉出信息页的时候会有停顿, 不像列表滑动时那样存在惯性
我参照这项目写的,RecyclerView显示不全,请问是什么原因
你好,谢谢你的开源
请教下SmartRefreshLayout:1.1.0-alpha-12,该demo的ViewPager显示不全,该怎么调整呢?
return !(xDistance >= yDistance || yDistance < scaledTouchSlop) && isNeedScroll;
把JudgeNestedScrollView这个控件的事件拦截改一下
提一个小bug,JudgeNestedScrollView只在一个构造方法中对scaledTouchSlop进行了赋值,这就造成scaledTouchSlop可能一直为0,导致滑TabLayout上滑到一半的时候滑动点击冲突,
如pixelxl2,华为p20,以及部分老机型都有类似问题
华为荣耀9青春版点击事件不执行
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.