xmusistone / persistentrecyclerview Goto Github PK
View Code? Open in Web Editor NEW京东首页 - 长列表内嵌ViewPager商品流(RecyclerView方案)
License: Apache License 2.0
京东首页 - 长列表内嵌ViewPager商品流(RecyclerView方案)
License: Apache License 2.0
当使用这个版本的下拉刷新时
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'
implementation 'com.scwang.smart:refresh-header-classics:2.0.3'
ChildRecyclerView没法触发下拉刷新
ParentRecyclerView 中有这么一段代码 当ChildRecyclerView 中item 是不规则的时候 computeVerticalScrollOffset()获取的滚动高度不准确
override fun onNestedPreScroll(target: View, dx: Int, dy: Int, consumed: IntArray, type: Int) { if (target is ChildRecyclerView) { // 下面这一坨代码的主要目的是计算consumeY var consumeY = dy val childScrollY = target.computeVerticalScrollOffset() } ........... }
你好,我在华为Mate 20手机上(EMUI10.1.0、Androd 10),页面滑到最底部,点击屏幕,页面会不自然的向上滚动一段距离。不知道这是什么原因。
在child 快速滑动,引发parent 滑动到顶部的时候,嵌套使用下拉刷新组件,SmartRefreshLayout 会出现,不释放下拉刷新。页面卡住
子列表设置item点击事件的时候会有滑动闪动的冲突问题
加载更多会有滑动冲突
作者写的这个非常棒,滑动效果也非常牛逼,滑动置顶的如京东的tablayout吧变换样式这个该怎么处理呢
最外层滑动到吸顶位置,就停了,内层可以滑动,外层无法和内层联动
问题:可以用support包下面的recyclerView跟viewPager吗?
描述:我换完了support包下的recyclerView跟viewPager(包括反射的一些方法修改),我的项目发现parentRecyclerView滑动很快的时候是没问题的,如果parentRecyclerView跟childRecyclerView同时在屏幕时,滑动childRecyclerView时只滑动childRecyclerView,而外层不动;
分析:不知道是不是我用的不是androidx下面的recycleview跟viewpager导致的,还有ParentRecycleView我用了淘宝的v-layout的VirtualLayoutManager;希望能得到作者的指点,同时感谢作者提供的方案。
Hi,作者你好,你实现的这个思路学习了,非常好。
在学习过程中,发现一个问题:
main_refresh_layout.setOnLoadMoreListener {
uiHandler?.sendEmptyMessageDelayed(MSG_TYPE_LOAD_MORE, 500L)
}
启用LoadMore后,整个列表在商品feeds流数据滑动到顶部后,就无法继续滑动了,因为直接出发了SmartRefreshLayout的LoadMore事件,排查下来,是由于SmartRefreshLayout的dispatchTouchEvent事件分发函数中,判定已经达到了LoadMore事件的出发条件,猜测是因为ParentRecyclerView中的onNestedPreScroll函数
if (consumeY != 0) {
consumed[1] = consumeY
this.scrollBy(0, consumeY)
}
改变mScrolly导致的,但是不知道如何下手修改,希望作者可以指点下。
Fragment 中的 RecyclerView 实现瀑布流feed 和 线性item 混排 有什么好的实现方式吗
目前 阿里的vlayout 能实现 就是滑动不是流畅 有卡顿
android 11,子recycleview,的惯性传递一半就不能滑动了,应该是反射禁用问题,大神又解决方法没
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.