Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I set minAPI to 21, do I need AppCompat?

I decided to make my minimum API version 21 for Android, but does this mean it makes no sense to use the AppCompat anymore? Just use plain Material Design / no AppCompat / etc?

like image 995
AJJ Avatar asked Aug 09 '16 00:08

AJJ


People also ask

What is the use of Appcompat?

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.

What is Androidx Appcompat Appcompat?

appcompat:appcompat. Official Description: The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later.

What API level should I develop for?

New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level 30) or higher.

What should be minSdkVersion in Android?

android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1".


1 Answers

No, you should always use AppCompat. This ensures that your app is already consistent across all API levels and you have access to all new APIs (such as using the Colored buttons, which was only introduced in API 23).

Many other libraries, such as the Design Support Library also require use of AppCompat.

like image 190
ianhanniballake Avatar answered Oct 04 '22 12:10

ianhanniballake