yanyusong / Y_DividerItemDecoration

A common RecyclerView divider , supports the LinearLayoutManager and the GridLayoutManager.
https://juejin.im/post/5940a020a0bb9f006b734228
Apache License 2.0
378 stars 56 forks source link

item不一样大怎么办 #2

Closed chenzixue closed 7 years ago

chenzixue commented 7 years ago

GridLayoutManager布局,2列。i%2==0时设置右边距和下边距,i%2==1时只设置下边距,发现左边的item比右边的小。如果i%2==0设置右边距和下边距,i%2==1设置左边距和下边距。垂直边距和横向边距又不一样大

yanyusong commented 7 years ago

是的,确实存在这样的问题,我刚仔细想了一下GridLayout2列的话,item宽度是等分屏幕宽度的没错,但是分割线作为itemDecoration实际上是占用了所在item的宽度的了,所以所在的item自然就小了,分割线细的话可能看不太明显,分割线粗了估计就很明显了,我现在已经想好了几种方案来,请持续关注,很快就会更新,或者加我qq,1924355291

chenzixue commented 7 years ago

更新真快!!!

yanyusong commented 7 years ago

代码提交过了,但是文档已经落后好久了,一直没时间更新,真是太抱歉了,你运行demo试过了吗?有问题可以跟我联系,我尽快更新文档

yanyusong commented 7 years ago

2.0版中文文档已更新

chenzixue commented 7 years ago

感谢回复!运行过了,没有问题