android-support-v7-appcompat 和 android-support-v4 的区别 [英] Difference between android-support-v7-appcompat and android-support-v4

本文介绍了android-support-v7-appcompat 和 android-support-v4 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 android-support-v4.jar 之间的区别和 android-support-v7-appcompat.jar.如果我想在我的应用程序中添加 appcompat 操作栏,我需要同时添加 android-support-v7-appcompat.jarandroid-support-v4.jar 还是只添加android-support-v7-appcompat.jar.

另外,android-support-v13.jar 有 appcompat 吗?

解决方案

UPDATE

自从回答这个问题以来,对支持库进行了许多更改.好消息是,它也有很好的记录.因此,您必须阅读支持库文档以了解更多详细信息和更多可用的支持库.

<块引用>

从支持库版本 26.0.0(2017 年 7 月)开始,最低大多数支持库中支持的 API 级别已增加到适用于大多数库包的 Android 4.0(API 级别 14).

<小时>

以下是与支持库包的区别:><块引用>

v4 支持库

此库旨在用于 Android 1.6(API 级别 4) Android 2.3(API 级别 9) Android 4.0(API 级别 14)及更高版本.与其他 API 相比,它包含最大的 API 集库,包括对应用程序组件的支持、用户界面特性、可访问性、数据处理、网络连接和编程实用程序.

v7 库

有几个库设计用于 Android 2.1(API 级别 7) Android 2.3(API 级别 9) Android 4.0(API 级别 14)及更高版本.这些库提供了特定的功能集和可以彼此独立地包含在您的应用程序中.

v7 appcompat 库

这个库增加了对操作栏用户界面设计模式的支持.

<块引用>

注意:该库依赖于 v4 支持库.如果您使用 Ant 或 Eclipse,请确保包含 v4 支持库作为一部分这个库的类路径.

所以是的,如果你想使用 v7,你需要两个 jar.

<小时>

android-support-v13.jar 的更新

<块引用>

v13 支持库

此接口已在 API 级别 27.1.0 中弃用.使用 Fragment 而不是框架 Fragment.

v13 支持库

<块引用>

此库旨在用于 Android 3.2(API 级别 13)及更高版本.它增加了对 Fragment 用户界面模式的支持使用 (FragmentCompat) 类和额外的片段支持班级

当您看到 包详细信息时定义中给出的 FragmentCompat 类.所以它没有appcompat库的所有类.

I wanted to know the difference between android-support-v4.jar and android-support-v7-appcompat.jar. If I want to add appcompat Action Bar in my application do I need to add both android-support-v7-appcompat.jar and android-support-v4.jar or only android-support-v7-appcompat.jar.

Also, does android-support-v13.jar has appcompat?

解决方案

UPDATE

There are many changes done into support library since this question was answered. Good thing is, it is very well documented also. So you must read Support Library Documentation for more details and more available support library.

Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages.


Below is difference from Support Library Packages:

v4 Support Library

This library is designed to be used with Android 1.6 (API level 4) Android 2.3 (API level 9) Android 4.0 (API level 14) and higher. It includes the largest set of APIs compared to the other libraries, including support for application components, user interface features, accessibility, data handling, network connectivity, and programming utilities.

v7 Libraries

There are several libraries designed to be used with Android 2.1 (API level 7) Android 2.3 (API level 9) Android 4.0 (API level 14) and higher. These libraries provide specific feature sets and can be included in your application independently from each other.

v7 appcompat library

This library adds support for the Action Bar user interface design pattern.

Note: This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure you include the v4 Support Library as part of this library's classpath.

So yes you need both jars if you want to use v7.


Update for android-support-v13.jar

v13 Support Library

This interface was deprecated in API level 27.1.0. Use Fragment instead of the framework Fragment.

v13 Support Library

This library is designed to be used for Android 3.2 (API level 13) and higher. It adds support for the Fragment user interface pattern with the (FragmentCompat) class and additional fragment support classes

When you see the package details it has a class FragmentCompat as given in definition. So it has not the all classes of appcompat library.

这篇关于android-support-v7-appcompat 和 android-support-v4 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆