android - SupportLibrary 的目的

标签 android android-fragments android-support-library

我没有使用 SupportLibrary,直到看到新的 Facebook API 仅使用支持 fragment 的方法,所以我将它们全部更改为支持。 问题:那么使用 SupportFragments 对 Android 开发者来说是“必须的”吗?

是的,我看到了文档: http://developer.android.com/tools/support-library/index.html

最佳答案

这完全取决于您的目标设备。但是一些库依赖于支持库,因为它们也选择支持旧设备。

您始终可以限制您的 minSDKVersion 以避免支持旧设备。如果您使用的库也带有 AndroidManifest.xml,您可能还需要调整它们的 minSDKVersions。

android:minSdkVersion

查看相关文档:

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#apilevel

关于android - SupportLibrary 的目的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32246813/

相关文章:

android - Material Design 应用程序需要状态栏和工具栏之间的阴影吗?

android - react 导航从嵌套导航器更改 Activity 选项卡

android - Android 中 fragment 的深层层次结构

android - 支持库中的 RecyclerView 在哪里?

android - 非法状态异常 : Can not perform this action after onSaveInstanceState - Android

android - fragment 显示/隐藏根本不起作用

android - 你如何实现底部有按钮的 snackbar ?

android - Listview itemclick 不起作用

java - 如何为ListView中的每一项设置id

Android webView 保存状态