zaaach / transformerslayout Goto Github PK
View Code? Open in Web Editor NEW:fire::fire::fire: App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
:fire::fire::fire: App金刚区导航菜单,类似淘宝、QQ音乐等APP导航,方格布局横向多行滑动翻页带滚动条
指定了2列 但是数据 显示不全 item布局修改了宽度 一样显示不全
`
val menu :TransformersLayout = TransformersLayout(requireContext())
menu.load(iconData, object : TransformersHolderCreator<IconBean> {
override fun getLayoutId(): Int {
return R.layout.item_index
}
override fun createHolder(itemView: View): Holder<IconBean> {
return meunViewHolder(itemView)
}
})
grid_viewpager.addView(menu)`
log显示RecyclerView: No adapter attached; skipping layout
0 2 4 6 8 0 1 2 3 4
1 3 5 7 9 变成 5 6 7 8 9
谢谢
崩溃信息:
Binary XML file line #117 in layout/activity_mood: com.zzx.headerlayout_kotlin.transformation.ScrollTransformation
类名:null
方法:null
行数:0
大佬, 希望加一个可以设置滚动条宽度的方法, 就是不让黄色滚动条按比例变长变短, 能够设置固定宽度, 即使金刚区列表变多变少, 滚动条宽度也不会改变
麻烦作者是不是要把OnTransformersItemClickListener 这个接口中的View给放出来,现在只有position
点击监听 OnTransformersItemClickListener 只返回了 position,如果是设置了 pagingMode = true 则返回的position 和数据列表的下标不能对应
首先,感谢作者提供了 AndroidX 版本的代码,但是本人暂时不想使用 AndroidX,所以在作者的基础上,结合项目实际做了些调整。
1、修复与 ViewPager 使用时滑动冲突的问题;
2、增加阻尼效果;
感谢作者的启发和帮助,我把我得到的启发留在这里,希望能够帮助到更多的朋友,如果有需要的朋友移步 Gitee。
https://gitee.com/jboob/transformers-layout
比如tl_lines 设置的是3行 一行设置5个数据源 如果总数据源只够1行 或者2行的时候 布局高度 还是按3行高度显示
设置左右边margin时,item的数量填不满一页,还出现显示不完整并能左右滑动的bug。
app:tl_scrollbarTrackColor="#f0f0f0"
app:tl_scrollbarThumbColor="#ff1919"
设置色值无法改变颜色,包括代码设置options一样没有效果
滑动过程中突然抖一下,高亮部分的宽度根据数据应该是可以计算出来的,数据不变,这个宽度我觉得应该不会变啊
//每个item平分整个屏幕的宽度
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) itemView.getLayoutParams();
params.width = mRecyclerView.getMeasuredWidth() / spanCount;
我的情况是这里获取到的MeasuredWidth和width都为0..延时加载后,MeasuredWidth为0.width正确了,但是在onBind里面读取控件的宽高都为0,什么情况?
重排之后 点击下标还是不对啊
app:tl_scrollbarRadius="20dp" 设置无反应
当数据不足一页时,比如6条数据,position不是按照重新排列的顺序,还是按照重新排列之前的顺序排列的,当点击后面的数据时,监听会有问题
设置的行数为2行,load时添加数据大小0时,刷新数据后,一直是单行。DEMO可复现
看到这效果让我想起了表情展示控件,就类似微信那种,所以有几点建议的功能看下能不能加到库里面:
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.