I\'m dynamically adding Views to my items in a RecyclerView
. These added Views should only be related to the item which they\'re added to, but I\'m having a pro
You need to track what views have been added based on the backing data. I would probably add any necessary extra views in onBindViewHolder()
, and remove any that might be present in onViewRecycled()
. Then when you want to make one appear dynamically, change whatever variable you have tracking whether it should be visible, and call notifyItemChanged()
.