Presentation is loading. Please wait.

Presentation is loading. Please wait.

Android Support Libraries A brief explanation.

Similar presentations


Presentation on theme: "Android Support Libraries A brief explanation."— Presentation transcript:

1 Android Support Libraries A brief explanation.
Cosc 4/5730 Android Support Libraries A brief explanation.

2 Why? Android currently has many API versions in common use.
Android 2.3.X, 4.0 to 9.x. Many new features have been added, changed, etc The support libraries attempt to provide support for the older APIs V4, v7, v8 are designed for 2.3.X+ (API 9+) Note, android has dropped all support API 9 and below. With limited support below api 16. V13 for 3.2 (api 13+), v14 for 4.0 (api 14+) V17 is for the TV versions of android. For non-numbered, assume API 16+, unless otherwise stated.

3 "v4" support libraries Version 24.2 is the last version to have this as a single library. If was broken up in smaller more manageable pieces. current version is , note the first number is the API version If you compiling at API 26, you MUST use a 26.X version. Support-compat, support-core-utils, support-core-ui, support-media-compat, support-fragment Provides a number of widgets and fragments that we will use.

4 v7 support libraries V7 appcompat library
Note, these depends on the v4 libraries The appcompat-v7: is will mostly be included in your project by default. Includes actionBar, appCompatActivities, and AppCompatDialogs that will look at.

5 v7 support libraries (2) The v7 cardview, recyclerview, and palette libraries will be covered directly in class. The gridlayout libraries and mediarouter will be left for your interest. And the v8 renderscript library. v7 and v14 preference support libraries will be covered together

6 V13 support library Support-v13 provides fragmentcompat classes, which are "shims" so fragments can be written the same way from v4 on. Note though the v4 are called fragment, while v13 called FragmentCompat Almost none of my example code uses the v13 support library, instead they use the v4 fragment. It's very rare to see android use the v13 library as well.

7 V7 and 14 preference The preference system has changed several times in the versions of android. V7 and v14 are attempts to provide compatibles and fixes across the versions. We cover both, but look more at v14, then v7.

8 Others Support-vector-drawable and animated-vector-drawable
Support for vector graphics (animated and static) Animated may only work at API 24+ Annotations Support Library, which cover briefly with the Architecture components. Design support library provides a number of material design widgets, such as navigation drawers, floating action buttons (FAB), snackbars, and tabs We cover most of design library Constraintlayout library The new default layout provided by android. We cover this in the next couple of lectures.

9 others (2) We won't cover the V17 preference and leanback libraries
These are the android TV libraries (maybe covered in second semester) ExifInterface support JPEG and RAW for meta data info Recommendation support, which for TV recommends Custom Tabs support adds Custom Tabs services and callbacks. Percent support adds a percentlayout for frame, relativelayout, etc. Wear UI (covered in second semester) Android "watch" support Note android auto and Android Things are a different SDK, so no support lib is needed.

10 Support library refactoring
Starting in API 28, all of the support libraries are going to be refactored and broken up in even smaller libraries You will have to target API 28 to use them, plus Gradle.properties file add the following (not default in studio yet) android.useAndroidX=true android.enableJetifier=true Refactoring: com.android.support -> androidx Example com.android.support:appcompat-v7 => androidx.appcompat:appcompat

11 Support library refactoring (2)
Version 28.X+ new libraries: asynclayoutinflater (from support-core-ui), collections (from support-compat), coordinatorlayout (from design), cursoradapter (from support-core-ui), customview (from support-core-ui), documentfile (from support-core-utils), drawerlayout (from support-core-ui), interpolator (from support-core-ui), loader (from support-fragments and core-utils), localbroadcastmanager (from support-core-utils), print (from support-core-utils), slidingpanelayout (from support-core-ui), swiperefreshlayout (from support-core-ui), viewpager (from support-core-ui) There will be a final feature version with the android P release. All new feature release will be for androidx. I'll cover the break out in my examples as time allows.

12 References

13 Q A &


Download ppt "Android Support Libraries A brief explanation."

Similar presentations


Ads by Google