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
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.
Can’t you just remove the corresponding item from the array?