Hi I want to skip some items from recyclerview
.
Here is the bi
By making them View.INVISIBLE
you are not removing the reserved spaces. Instead you could use View.GONE
to make them invisible and allow the reserved space to be taken.
Since you are setting the Views
visible again you have to undo it with the if-else clause e.g.
if (!download.isEmpty() && !desc_new.isEmpty()) {
// make visible
} else {
// make invisible with gone e.g.
holder.movieTitle.setVisibility(View.GONE);
holder.imageView.setVisibility(View.GONE);
}