3

Wha's the difference between the Android Theme.AppCompat and Base.Theme.AppCompat? When should we use the Base theme?

<style name="flatButton" parent="Base.Widget.AppCompat.Button.Borderless">
    <item name="colorAccent">@color/colorAccent</item>
</style>

<style name="flatButton2" parent="Widget.AppCompat.Button.Borderless">
    <item name="colorAccent">@color/colorAccent</item>
</style>
georgeok
  • 5,321
  • 2
  • 39
  • 61

1 Answers1

6

You shouldn't use the Base theme at all - always use the standard themes. The Base themes are used internally to AppCompat and serve as a common base that applies to all API levels - it does not include the API level specific changes that are needed to properly function (something only the standard themes supply).

ianhanniballake
  • 191,609
  • 30
  • 470
  • 443
  • 2
    What about this? https://stackoverflow.com/a/30749068/4342778. Really the only thing that helped. – Goltsev Eugene Jul 08 '17 at 15:48
  • @GoltsevEugene did you ever find another solution to the question you linked or did you continue using Base.Theme? I'm trouble shooting the same problem and like you said using Base.Theme is the only thing so far that's worked. – ThePartyTurtle May 24 '18 at 16:50
  • @ThePartyTurtle, you know, at that moment I just leave this question and continued use Theme, did not remember why. Now I checked - everything is fine - AS highlight Theme.AppCompat... in red, but project is building well and in preview everything is well also. – Goltsev Eugene May 25 '18 at 09:46
  • @GoltsevEugene hmm interesting, thanks for the update. I'm still having issues but for the time have resolved to just use base only to mockup UI - could be worse. I'll be in a better position to update AS too shortly maybe that will resolve some things. – ThePartyTurtle May 29 '18 at 14:22