mcxtzhang / zlayoutmanager Goto Github PK
View Code? Open in Web Editor NEWSome custom LayoutManager .Such as SwipeCard、FLowLayout。一些自定义的LayoutManager,仿探探、人人影视 炫动滑动 卡片层叠 和流式布局等。
Home Page: http://blog.csdn.net/zxt0601/article/details/53730908
Some custom LayoutManager .Such as SwipeCard、FLowLayout。一些自定义的LayoutManager,仿探探、人人影视 炫动滑动 卡片层叠 和流式布局等。
Home Page: http://blog.csdn.net/zxt0601/article/details/53730908
如何让左划右划不删除呢?
@OverRide
public int scrollVerticallyBy(int dy, RecyclerView.Recycler recycler, RecyclerView.State state)
{
//位移0、没有子View 当然不移动
if (dy == 0 || getChildCount() == 0)
{
return 0;
}
//以下是边界判断
if (getItemCount() == getChildCount()
&& getDecoratedTop(getChildAt(0)) >= 0
&& (getHeight() - getPaddingBottom()) >= getDecoratedBottom(getChildAt(getChildCount() - 1)))
{
return 0;
}
//.....//
当我的列表没有达到一屏时,滑动会闪屏
如果布局里边又有一个recyclerview,怎么解决冲突呢?
代码一行未改,ImageView的图片是从网络上加载的,在上下滑动的时候,当出现之前未出现过的ImageView就会触发onLayoutChildren,触发后整个布局就会重新回到position(0)的位置,下次滑动到该位置就正常了,但是滑动到下一行新出现的ImageView还是会重新触发onLayoutChildren,又回到顶端了,这可能是什么原因呢?
似乎停止维护了。
当数据少时,界面不能填充完全RecyclerView,滑动界面出现抖动问题。
目前没有一个按钮 控制直接左右滑,还有就是还原上一个删除的
滑动卡片时,有时候卡片感觉很“顽固”,滑不出去,一般来讲,当手指不是水平滑动,而是带有纵向偏移的斜横向滑动时容易出现这种情况,请问如何让它变得“敏感”一些,就是一点水平偏移都可以让卡片滚动出去,希望大佬解答,谢谢。
流式布局,嵌套recyclerView时候数据显示不全,只显示一行数据
我现在的需求是滑到最后有一个提示框出来,试了好几种办法都不能很好的解决,可以帮忙指点下嘛
我用了你写的流式布局,界面一片空白,找不到原因在那,Debug看了下,保存的Rect的好像有问题
1 用了这个库之后发现无法显示item,而且convert方法也不走,很奇怪。用的楼主的TantanActivity方式
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
楼主仿造的最美有物还没有完成啊,有很多的问题.再者反编译原有app之后发现并不是楼主的思路,想了很久也不知道楼主往下写下去的思路是什么?
rv高度wrap的时候竟然不显示,必须要指定高度..emmmm...
https://github.com/xiangcman/LayoutManager-FlowLayout
这个没这个毛病..
当滑动不是最顶层的view时,虽然会回弹,还是显示顶层的view,但是当第二次循环时,view的位置错乱了
怎样修改层叠样式在上方呢?
当recycleView嵌套recycleView时,外层的RecyclerView使用GridLayoutManager,嵌套的recycleView的流布局LayoutManager时,显示不完全,只显示一行,但是数据有很多
感谢这个例子,在使用这个例子,发现了一个小问题:
感觉原因在顺序addChildView,设置 Rect 跳过了这块:
// 顺序addChildView
// 计算宽度 包括margin
if (leftOffset + getDecoratedMeasurementHorizontal(child) <=
...
第二屏时,走:
// 新起一行的时候要判断一下边界
if (topOffset - dy > getHeight() - getPaddingBottom()) {
//越界了 就回收
removeAndRecycleView(child, recycler);
mLastVisiPos = i - 1;
}
这样导致了mItemRects 不完整,比如 1-8为第一屏,9-16,为第二屏,9 没有添加到 mItemRects
我们也要仿探探 但是我们的上下间距比较大 导致了手指可以触碰到其他非顶层的View 大佬 怎么限制住不让非顶层的滑动呢,这样会导致数据混乱 还有数据也是反过来的,demo 最顶层是8呢 不是第一个。
当条目内容没有超出屏幕一屏时,不论是向上滑动还是向下滑动,所有条目会瞬间向反方向滑动 #1
我看了一下,探探的卡片向下滑动时会覆盖掉其他 Button 等控件。
如果单纯用 LayoutManager 和 Callback 来实现的话, 卡片滑动到 RecyclerView 的边界以后就消失了。
用 Android Monitor 看了一下,探探的似乎是把下面的两个按钮跟可滑动的卡片放在一个重写的 ViewGroup 里面,并没有用 LayoutManager 来实现。
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.