cannot convert from android.app.FragmentManager to android.support.v4.app.FragmentManager

前端 未结 1 1063
轮回少年
轮回少年 2020-12-24 04:24

I am creating an app using Fragments for tablet.I have so far created some buttons on the left side and the fragments appear on clicking the buttons.

But i am experi

相关标签:
1条回答
  • 2020-12-24 05:11

    You need to use getSupportFragmentManager() in your code, not getFragmentManager() - see here for more details.

    You also need to extend your class from android.support.v4.app.FragmentActivity, not just from standard android.Activity to get this method.

    0 讨论(0)
提交回复
热议问题