Dozen

Contributor:Dozen729 Type:English Date time:2020-06-11 16:33:35 Favorite:19 Score:0.4
返回上页 Report
请选择举报理由:




Collection Modify the typo
note with the release of android api level there is a new version of the support library
called androidx which is part of jetpack the androidx library contains the existing support
library and also includes the latest jetpack components you can continue to use the support
library historical artifacts those versioned and earlier and packaged as android support will
remain available on google maven however all new library development will occur in the
androidx library we recommend using the androidx libraries in all new projects you should also
consider migrating existing projects to androidx as well when developing apps that support
multiple api versions you may want a standard way to provide newer features on earlier
versions of android or gracefully fall back to equivalent functionality rather than building
code to handle earlier versions of the platform you can leverage these libraries to provide
that compatibility layer in addition the support libraries provide additional convenience
classes and features not available in the standard framework api for easier development and
support across more devices originally a single binary library for apps the android support
library has evolved into a suite of libraries for app development many of these libraries are
now a strongly recommended if not essential part of app development this document provides an
overview of the support library to help you understand its components and how to use it
effectively in your app caution starting with support library release july the minimum
supported api level across most support libraries has increased to android api level for most
library packages for more information see version support and package names in this document
uses for the support libraries there are a few distinct uses for the support libraries
backward compatibility classes for earlier versions of the platform is just one of them here
is a more complete list of ways you can use the support libraries in your app backward
compatibility for newer apis a large amount of the support libraries provide backward
compatibility for newer framework classes and methods for example the fragment support class
provides support for fragments on devices running versions earlier than android api level
convenience and helper classes the support libraries provides a number of helper classes
particularly for user interface development for example the recyclerview class provides an
user interface widget for displaying and managing very long lists useable on versions of
android from api level and up debugging and utilities there are a number of features that
provide utility beyond code you incorporate into your app including the support annotations
library for improved code lint checks on method inputs and multidex support for configuring
and distributing apps with over methods using support versus framework apis support libraries
provide classes and methods that closely resemble apis in the android framework upon
discovering this you may wonder if you should use the framework version of the api or the
support library equivalent here are the guidelines for when you should use support library
classes in place of framework apis compatibility for a specific feature if you want to support
a recent platform feature on devices that are running earlier versions of the platform use the
equivalent classes and methods from the support library compatibility for related library
features more sophisticated support library classes may depend on one or more additional
support library classes so you should use support library classes for those dependencies for
example the viewpager support class should be used with fragmentpageradapter or the
fragmentstatepageradapter support classes general device compatibility if you do not have a
specific platform feature you intend to use with your app in a backward compatible way it is
still a good idea to use support library classes in your app for example you may want to use
activitycompat in place of the framework activity class so you can take advantage of newer
features later on such as incorporating the new permissions model introduced in android api
level support library classes that provide a compatible implementation of platform api classes
may not be able to provide the full set of functionality available in the latest release due
to the limitations of the host device platform version in these cases support library classes
are designed to degrade gracefully and may not provide the all the functionality or data of
the current platform api for this reason you should review the reference documentation for the
library classes and methods you use and thoroughly test on devices running the earliest
version of the platform supported by your app note the support libraries do not provide
equivalent classes and methods for each framework api in some cases you may need to wrap a
framework method call with an explicit sdk version check and provide alternative code to
handle methods not available on a device for more information on using version checks in your
code see supporting different platform versions version support and package names some of the
support library packages have package names to indicate the minimum level of the api they
originally supported using a v notation such as the support v package starting with support
library version released in july the minimum supported api level has changed to android api
level for all support library packages for this reason when working with any recent release of
the support library you should not assume that the the v package notation indicates a minimum
api support level this change in recent releases also means that library packages with the v
and v are essentially equivalent in the minimum level of api they support for example the
support v and the support v package both support a minimum api level of for releases of the
support library from and higher support library release versions the release version of the
support library such as or is different from the minimum api level supported by any library in
that release the release version number indicates which version of the platform api it was
built against and therefore what the most recent apis may be included in this version of the
libraries specifically the first section of the release version number for example the in
version generally corresponds with the version of the platform api available when it was
released the release version level of the support library indicates it incorporates some
features of that api level but you should not assume it provides compatibility with all
features released in the new platform api version library dependencies most libraries in the
android support library suite have some dependency on one or more libraries for example nearly
all support libraries have a dependency on the support compat package in general you do not
need to worry about support library dependencies because the gradle build tool manages library
dependencies for you by automatically including dependent libraries if you want to see what
libraries and library dependencies are included in your app run the following command at the
build root of your app development project to get a report of the dependencies for that
project including android support libraries and other libraries gradle q dependencies your app
project dependencies for more information about adding support libraries to your development
project using gradle see support library setup for more information about working with gradle
see configure your build note that all android support libraries also depend on some base
level of the platform for recent releases that is android api level or higher
声明:以上文章均为用户自行添加,仅供打字交流使用,不代表本站观点,本站不承担任何法律责任,特此声明!如果有侵犯到您的权利,请及时联系我们删除。
Hot degree:
Difficulty:
quality:
Description: the system according to the heat, the difficulty, the quality of automatic certification, the certification of the article will be involved in typing!

This paper typing ranking TOP20

用户更多文章推荐