I want to use Material Design in my app, but my app should be based on Jellybean not Lollipop. So my question is:
I want to use com.android.support:appcompat-v7:23.1.1
. Is this a possible solution for my problem?
I want to know more about compileSdkVersion
and minSdkVersion
: If compileSdkVersion is 20 and minSdkVersion is 18, then, if I use some material design(in Lollipop, sdk20) like fab, cardview
. Is it fine if I run my app in jellybean device?(which is SdkVersion 18
, same with minSdkVersion
)?
When new versions of android are published, Google will have to support the older versions of android. So AppCompat is a set of support libraries which can be used to make the apps developed with newer versions work with older versions.
androidx.appcompat.app.AppCompatActivity. Base class for activities that wish to use some of the newer platform features on older Android devices. Some of these backported features include: Using the action bar, including action items, navigation modes and more with the setSupportActionBar(Toolbar) API.
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.
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.
When new versions of android are published, Google will have to support the older versions of android. So AppCompat is a set of support libraries which can be used to make the apps developed with newer versions work with older versions.
For example: When you create an android project with minimum Api level 9, and target api level 21, The newer features like ActionBar, Drawer Menu (Newer in the sense that they were not present in Api 9) etc should also be supported in Api Level 10 phones. Then, you can use the appCompat library. So the android actionbar will become androidsupport actionbar/ supportFragment etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With