Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should I use appcompat libraries android?

I'm writing a new app, and in this project I'm using the minSdkVersion = 21 (lollipop), so my question is: should I use any appcompat library once I'm targeting a quite new API?

like image 368
guisantogui Avatar asked Jan 09 '18 10:01

guisantogui


People also ask

What is Appcompat library in Android?

426. An Android support library that enables the use of the ActionBar and Material Design specific implementations such as Toolbar for older devices down to Android v2. 1.

What are support libraries in Android?

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.

What is AndroidX library?

The Android Extension Library, often known as AndroidX, is the new open-source project that is a significant upgrade to the original Android Support Library and can be used to develop, test, package version, and release libraries within Jetpack. The Android Jetpack libraries are part of the AndroidX namespace.

Which v7 support libraries are used for modifying UI settings?

v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference.


2 Answers

You should & you need to.

why:

  1. android os is emerging new features and updates day by day. To give these features & updates in older version this is the way.
  2. Consistent UI looks for all versions.

check this out.

like image 186
Sayem Avatar answered Sep 29 '22 02:09

Sayem


In Android appcompat-v7, as with Theme.Material, supports the notion of a custom theme defining colors, like colorPrimary and colorAccent. Native Theme.Material widgets on Android 5.0+, and supported widgets in appcompat-v7, will use those colors in accordance with the Material Design guidelines.

The support library injects the compatibility code automatically. The classes provided by the support library are only needed when writing a new custom view. In this case you have to extend the AppCompat views in order to get the new properties such as tint.

like image 42
Gowtham Subramaniam Avatar answered Sep 29 '22 00:09

Gowtham Subramaniam