Jenthe
Jenthe

Reputation: 797

No Action Bar shown when using AppCompat-Theme and Activity

Okay, I'm gonna keep this as simple as possible:

I have two styles, one for users of API 21 (Lollipop) and a default one for everything between API 14 and 21.

When the parent theme inherits from the AppCompat library (e.g. Theme.AppCompat.Light) there is no action bar shown when using Activity classes.

I know I can use ActionBarActivity for this. The problem is that I use the theme Material.Light when running on version 21 which isn't compatible with ActionBarActivity. What's the best solution for this problem?

Upvotes: 1

Views: 703

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007544

What's the best solution for this problem?

Pick one action bar implementation and stick with it. Either use appcompat-v7 for all API levels, or use the native action bar for all API levels. Note that the appcompat-v7 action bar backport looks a lot like the Theme.Material action bar, as part of the vision of appcompat-v7 is to bring the Material Design aesthetic to older devices.

Upvotes: 3

Related Questions