Dynamically adding Views in a RecyclerView only to current item

前端 未结 8 2022
一向
一向 2020-12-20 12:08

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

8条回答
  •  攒了一身酷
    2020-12-20 12:42

    You should take any Empty Layout like Linearlayout in your child item layout XML and then add views into that LinearLayout of your particular item in this way when you scroll List all of you child views which you have added to LinearLayout also scroll with that item .

提交回复
热议问题