How to call a fragment from BaseAdapter Class Android?

前端 未结 7 645
走了就别回头了
走了就别回头了 2020-12-17 03:38

I want to call a Fragement from my BaseAdapter Class. In this class I have button on click of which I want to call the new fragment, but I am not able to get this. I have to

相关标签:
7条回答
  • 2020-12-17 04:02

    Parse FragmentManager xxx object to Adpter Constructor,

    **xxx**.beginTransaction().replace(your_container, new YourNewFragment()).addToBackStack(null).commit();
    
    0 讨论(0)
提交回复
热议问题