I am using a RecyclerView in my app but when I scroll on my RecyclerView my items will disappear! I used this code for a lot of RecyclerView but this time I don\'t know what
To hide certain views with multiple items, it is better to hide the base layout by,
1. Give an id to the base layout of the view in XML.
2. Define the view inside your "RecyclerViewAdapter class"
LinearLayout mItems_timelineId;
mItems_timelineId = itemView.findViewById(R.id.items_timelineId);
3. Then remove the view wherever you wish to by,
mItems_timelineId.removeAllViews();
This is worked for me. Thank you.