Add fragment into listview item

后端 未结 6 1001
-上瘾入骨i
-上瘾入骨i 2020-12-01 08:47

I want to have a fragment for each item in a listview, because I want to separate some logic out. I am using a view holder for each item. If the view doesn\'t exist, I creat

6条回答
  •  情歌与酒
    2020-12-01 09:06

    Instead of using ListFragment, you can use RecyclerView, Android has documentation on that:

    https://developer.android.com/training/basics/fragments/creating.html#AddInLayout

提交回复
热议问题