What is an Android Support Library?

2019-02-01 21:00发布

What is the purpose of an Android Support Library?

Does this mean http://developer.android.com/tools/extras/support-library.html?

Currently my app minSdkVersion is restricted to level 10.

I am trying to use ViewPager, which is not available for a higher API (for example for level 16)...

What does this support library mean? Does it mean I can use ViewPager, and the user of the phone with API level less than 16 can still see ViewPager widget?

2条回答
\"骚年 ilove
2楼-- · 2019-02-01 21:39

From the description of the support library:

The Support Package includes static "support libraries" that you can add to your Android application in order to use APIs that are either not available for older platform versions or that offer "utility" APIs that aren't a part of the framework APIs. The goal is to simplify your development by offering more APIs that you can bundle with your application so you can worry less about platform versions.

Off course you have to use only the lower SDK available functions. You should also look the Google Support Library thats make available some new functions for older SDK. http://developer.android.com/tools/extras/support-library.html

查看更多
▲ chillily
3楼-- · 2019-02-01 21:40

Yes, support package will allow you to use most of the fragment widgets back to Android 1.6. With NineOldDroids (http://nineoldandroids.com/) and other packages such as ActionBarSherlock (http://actionbarsherlock.com/) from the same developer, you can get a lot of the goodies from ICS and above to work on old Android devices.

All you have to do is to import the compatibility libraries. The way they work is that for the new devices, they will use official Android API, for the old ones, they will simulate and run them in compatible ways, so things may look different.

查看更多
登录 后发表回答