Search code examples
androidandroid-actionbarmaterial-designandroid-appcompatandroid-actionbar-compat

Not sure if I should be using AppCompat, regarding themes, bars, etc


I have been really confused on this. I want to be able to have a lot of people use my app, but as of this post, this seems difficult unless you set your minimum API down to 16-17 or so.

Even if I am setting my API to this level, is there any point to me using things like AppCompatActivity / the Support Library?

If I want to use a Material theme, do I either have to set minimum API to 21 or use AppCompat?

Are "ActionBars" still a thing, or are they deprecated? I'm trying to find something that will allow me to display the bar on all preference screens (including nested screens). I'm also trying to include icons in both the bar and the preference items.

So I am unsure what API I need to use / what libraries to use.


Solution

  • Your question is similar to this previously asked question Should I use AppCompat v7 if minsdk is 14

    AppCompat libraries allow you to provide features and capabilities that are in later releases of Android to earlier releases that dont have them in their SDK versions. Theme features and capabilities are part of this, but certainly not limited to that. Example that you already stated is the material design one. If you want widgets and views that are introduced in SDK 21+ supported in say API 15 (ICS) then you would use AppCompat 21+. However, features that are in AppCompat +7 (example AnimatedVectorDrawable) would not be needed since Api 15 would already support that.

    So effectively it depends on the feature you want to support and the minimum SDK you are targeting.

    Hope that helps!