更新时间:2023-02-26 21:35:05
您必须使用由谷歌提供的兼容性库。这里是你如何使用碎片上的设备< 3.0
You have to use the compatibility libraries provided by Google. Here's how you use Fragments on devices < 3.0
安装后,右键单击要添加片段支持的Android项目。
Once installed, right click the Android project you want to add Fragment support for.
现在你的应用程序支持片段。有一些关键的不同使用兼容包在使用SDK 3.0+。例如
Now you application supports Fragments. There are some key differences to using the compatibility package over using SDK 3.0+. For instance
FragmentActivity
不是活动
。 getFragmentManager()
你必须使用 getSupportFragmentManager
FragmentActivity
NOT Activity
. getFragmentManager()
you have to use getSupportFragmentManager
享受!