Android Compatibility Package doesn't include Activity.getFragmentManager()

前端 未结 3 1700
不思量自难忘°
不思量自难忘° 2021-01-30 07:52

I started trying to add fragments to my Android app, which is based on 2.1, using the Android Compatibility Package that just came out on March 3rd. I included the library into

3条回答
  •  花落未央
    2021-01-30 08:40

    You will need to extend FragmentActivity instead of the normal Activity. Then you will be able to call getSupportFragmentManager() which works the same way as getFragmentManager().

提交回复
热议问题