getSupportFragmentManager() is undefined

后端 未结 8 1252
生来不讨喜
生来不讨喜 2020-12-29 00:50

I\'m getting the following error: \"The method getSupportFragmentManager() is undefined for the type new View.OnClickListener(){}\" in my fragment

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 01:38

    you will get rid of this problem by making the activity that calls the dialog extend FragmentActivity

    public class ObstetricsFragment1 extends FragmentActivity{
    

    this is inherent to the support library, as seen in DIALOG SPECS and SUPPORT LIBRARY SPECS

提交回复
热议问题