Help:
How to hide any item in recyclerview, I have tried http://blog.csdn.net/u0110601... and http://blog.csdn.net/rgen_xia...,
did not succeed,
The layoutparams obtained in onBindViewHolder is null, and params.height cannot be set.
Getting the highest level in itemview also cannot obtain params
伊谢尔伦2017-05-16 13:23:42
The reason why you get the layoutparams as null is that you did not give it to the parent when you LayoutInfalter. When you infalter, you gave the parent parameters, and then you can get them. Then if you want to hide a certain one, just visible gone height 0.
滿天的星座2017-05-16 13:23:42
can’t get it
LayoutParams
, 你可以new ViewGroup.LayoutParams(...)
然后View#setLayoutParams(...)
ah