android.support.v4.app.FragmentManager OR android.app.FragmentManager?

前端 未结 4 1267
走了就别回头了
走了就别回头了 2021-02-08 23:20

I\'m learning Android development. I get stuck at something that should be very easy.

Im creating an App with one Activity, 2 fragments and 1 interface.

         


        
4条回答
  •  星月不相逢
    2021-02-08 23:59

    It's simple.

    If you also want your app to run in older devices (below API level 11), use getSupportFragmentManager().

    If you want your app to run in devices with API Level above 11, then use getFragmentManger().

提交回复
热议问题