Search code examples
androidxamarinxamarin.androidxamarin-studio

What exactly is it Xamarin.android.support.v7.appcompat


I'm working with Xamarin.Android. Appcompat is actually necessary for use material design because the nougat package (Android.support.design) requires it. But why, for example, if I work only with API 27, I must add the AppCompat package? In my toolBox i've not the floatingActionButton, NavigationDrawer etc.. so I must add this packet to unlock them. What is exactly this package? I've read on the web that this package works with backward compatibility but I only work with new APIs, so why I must install it? Thanks.


Solution

  • AppCompat should add the functionality of the latest API to older APIs when needed. For instance, lollipop added the CardView class, which can be used in older Android APIs when AppCompat is used, with some minor differences (some of the Android L animations may not apply on older versions of Android for example). It is recommended to use AppCompat in most cases since more users will be able to run your app when you do (depending on your MinSdkVersion). If you want to know what classes you can access in AppCompat, you can take a look at the features here:

    https://developer.android.com/topic/libraries/support-library/features.html