What exactly is in the Android Support package? androidsupport

Source: Internet
Author: User

What exactly is in the Android Support package? androidsupport

If you like my blog, please pay attention to my Weibo, please click here (http://weibo.com/kifile), thank you

Reprinted please indicate the source (http://blog.csdn.net/kifile), thank you again


With the release of Android 5.0 Lollipop, Android has provided us with more support packages, but I believe most developers do not know what exactly exists in these packages as before, when should we use it. Now, let's take a look at the items in each version of the Support package one by one, so that we will not be confused when using it.


First, you need to understand the meaning of each Support package version suffix vX. Of course, I believe that all of you who come to the blog will know that Android has a version number for each version. For example, 2.1 is 7, 4.0 is 14, and 5.0 is 21. Here, the number after v represents the lowest version level that he can use. The reason why he cannot be used in a lower version is that with the upgrade of the version, there are many features or APIs that are not supported in the new version. Therefore, if you use these support packages in the old version, the application may crash.


Now, we can browse the supported support packages one by one from the beginning:

(1) support-v4

Support-v4 package is Android support package of the lowest level. The so-called v4 represents its minimum support for Android1.6 (API Level4). This version is actually a mature Android version, what's more, when we write an application, we generally only support the Android 2.x system at the lowest level. The 1.x system has basically been completely abandoned, therefore, you can use it as the most basic system component.

In the support-v4 package, it has a lot of classes, mainly includes the support for application components, user interaction experience of some tools, some data network tools, we will take a detailed look at some specific classes in it.

1. System Components

Fragment: in fact, Fragment did not officially enter the Android framework system until Android3.0. However, to ensure compatibility with earlier versions, Android has helped us adapt to the Fragment framework in earlier versions.

NotificationCompat: This is an adaptation to the notification bar and can help you display more information in the notification bar of earlier versions.

LocalBroadcastManager: This is used to broadcast notifications locally. When the notification you want to send is only received by this application, you should use it.

2. User Interface Interaction

ViewPager. I believe I don't have to say anything. It is mainly used to help us perform sliding interaction between interfaces.

PagerTitleStrip and PagerTabStrip are two help classes of ViewPager. Their role is to switch the Tab bar to help display

DrawerLayout, mainly used for implementation of Slide bars

SlidingPaneLayout, which is also used for implementation of Slide columns. Unlike DrawerLayout, when a slide bar is displayed in DrawerLayout, It is overwritten on the current page by default, slidingPaneLayout removes the current page.

3. Help class for Accessbility access

ExploreByTouchHelper, a tool class that helps you customize View to achieve Accessibility

AccessbilityEventCompat, AccessbilityNodeInfoCompat, AccessbilityNodeProviderCompat, AccessbilityDelegateCompat, which are applicable to the Accessibility function.

4. Data Access help class

Loader, mainly used to asynchronously load data

FileProvider, which provides the file sharing function between applications


(2) support-v7

1. Appcompat

This package is mainly used to implement the Holo style interface of Android in earlier versions. Like this, there is an open-source project called SherlockActionbar.

2. CardView

Card layout is a new package introduced recently when android5.0 was released. In my opinion, its main effect is to display the card flowers for applications.

3. GridLayout

Grid layout helps you arrange the entire layout in a grid or grid.

4. MediaRouter

This layout is mainly used to support GoogleCast and is mainly used for audio and video exchange display between devices.

5. Palette

This package is also the latest. Its function is to help Android implement its MaterialDesign, so that your Actionbar can be changed based on the corresponding color of the interface.

7. RecyclerView

This package also just came out. Its function is to replace ListView and GridView, but unfortunately it does not implement the OnItemClick interfaces. You need to handle it yourself.


(3) support-v8

Support-v8 has only one character, is used to render the script


(4) support-v13

The main role of this package is to provide more Framgnet feature support for systems above Android3.2, the reason for using it is that although the android-support-v4 package also supports Fragment, to be compatible with earlier versions, the Fragment effect is self-implemented. Some features of Fragment in later versions are lost. For sdk Versions later than v13, we can use it more effectively, code with more features


(5) support-v17

This package is mainly used to support TV devices and provides many components for TV devices.

For example:

BrowseFragment, DetailFragment, PlaybasckOverlayFragment, SearchFragment

But forgive me for not doing Android TV development, and I don't know what they are useful for. If you really want to view it, please go to the official website.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.