How to call getFragmentManager on Recycler.Adapter?

前端 未结 9 2114
执笔经年
执笔经年 2020-12-23 16:22

I am converting ListView of my app to RecyclerView. On ListView, it was very easy to implement OnClickListener but in RecyclerView, we have to do it in adapter. I want to op

9条回答
  •  萌比男神i
    2020-12-23 17:23

    in kotlin you can use this code:

        val fm : FragmentManager= (context as AppCompatActivity).supportFragmentManager
    

提交回复
热议问题