如果最小SDK = 14,则为Lollipop提供Appcompat,兼容性和支持库 [英] Appcompat, compatibility, and support libraries for Lollipop if minimum SDK = 14

本文介绍了如果最小SDK = 14,则为Lollipop提供Appcompat,兼容性和支持库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个现有的Android应用程序,最多支持18级API级别.我们使用了兼容性库19.1.0.现在我们要更改/升级为:

We have an existing Android app that supports API Level 8 up to 18. We used compatibility libraries 19.1.0. Now we are changing/upgrading to:

  1. 最低SDK = 14
  2. 目标= android-22

现在,由于存在不同版本的v4,v7,v13支持,兼容性和appcompat库,我不确定要包括哪些,哪些不应该.

Now given that there are v4, v7, v13 support, compatibility, and appcompat libraries in different versions, I'm not sure which ones to include and which ones not.

我们正在使用maven进行依赖性管理,并使用 Maven SDK部署程序

We are using maven for dependency management and using Maven SDK deployer

推荐答案

如果您使用的minSDK为14,那么从技术上讲,您不需要它们.但是,以下是需要考虑的事情:

If you are using a minSDK of 14 then technically you do not need any of them. However, here are things to think about:

支持v4 (com.android.support:support-v4:23.0.0)

  • 应用程序组件片段-添加了对用户封装的支持 Fragments的界面和功能,使应用程序能够 提供在小屏幕和大屏幕设备之间调整的布局.
  • NotificationCompat-添加了对丰富通知功能的支持.
  • LocalBroadcastManager-允许应用程序轻松注册和 在单个应用程序中接收意图,而无需广播它们 全球范围.
  • 用户界面ViewPager-添加一个ViewGroup来管理 子视图的布局,用户可以在其中进行滑动.
  • PagerTitleStrip-添加非交互式标题栏,可以是 作为ViewPager的子级添加.
  • PagerTabStrip-添加了一个导航小部件,用于在分页视图之间进行切换,也可以与ViewPager一起使用.
  • App Components Fragment - Adds support for encapsulation of user interface and functionality with Fragments, enabling applications to provide layouts that adjust between small and large-screen devices.
  • NotificationCompat - Adds support for rich notification features.
  • LocalBroadcastManager - Allows applications to easily register for and receive intents within a single application without broadcasting them globally.
  • User Interface ViewPager - Adds a ViewGroup that manages the layout for the child views, which the user can swipe between.
  • PagerTitleStrip - Adds a non-interactive title strip, that can be added as a child of ViewPager.
  • PagerTabStrip - Adds a navigation widget for switching between paged views, that can also be used with ViewPager.

App Compat v7 (com.android.support:appcompat-v7:23.0.0)

以下是v7 appcompat中包含的一些关键类 图书馆

Here are a few of the key classes included in the v7 appcompat library

  • ActionBar-提供操作栏用户的实现 接口模式.有关使用操作栏的更多信息,请参见 操作栏开发人员指南.
  • ActionBarActivity-添加一个应用程序活动类,该类必须用作使用支持库操作栏实现的活动的基类.
  • ShareActionProvider-添加对标准化共享操作的支持 (例如电子邮件或发布到社交应用程序中),可以放在操作栏中.
    • ActionBar - Provides an implementation of the action bar user interface pattern. For more information on using the Action Bar, see the Action Bar developer guide.
    • ActionBarActivity - Adds an application activity class that must be used as a base class for activities that uses the Support Library action bar implementation.
    • ShareActionProvider - Adds support for a standardized sharing action (such as email or posting to social applications) that can be in an action bar.
    • 支持v13 (com.android.support:support-v13:23.0.0)

      该库旨在用于Android 3.2(API级别13)和 更高.它添加了对Fragment用户界面模式的支持, (FragmentCompat)类和其他片段支持类. 有关片段的更多信息,请参见Fragments开发人员. 指导.有关v13支持库API的详细信息, 请参阅API参考中的android.support.v13包.

      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. For more information about fragments, see the Fragments developer guide. For detailed information about the v13 Support Library APIs, see the android.support.v13 package in the API reference.

      在此处查看其修订: http://developer.android.com/tools/support-library/index.html

      查看此处列出的所有库: http://developer.android. com/tools/support-library/features.html

      See all of the libraries listed here: http://developer.android.com/tools/support-library/features.html

      这篇关于如果最小SDK = 14,则为Lollipop提供Appcompat,兼容性和支持库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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