在3.0之前写fragment是要引进extras/android/compatibility/v4/android-support-v4.jar包

并且要注意,实现的Activity必须是继承:FragmentActivity。

而3.0不需要,因为3.0将比如getFragmentManager()方法已经加入到Activity中了。

而3.0以前版本要通过继承FragmentActivity获得类似功能。

 

负责会出现错误:Error inflating class fragment

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-04
  • 2021-05-21
  • 2021-06-08
  • 2021-11-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-29
  • 2022-01-09
  • 2022-12-23
  • 2021-04-22
  • 2022-12-23
  • 2021-08-12
相关资源
相似解决方案