Maximus1809
Maximus1809

Reputation: 585

Android - No ActionBar with API 10

i use the ActionBar from the support library to include the actionbar on pre 3.0-devices.

But the problem is, that there is no actionbar showing (with API 10 - on emulator).

With Android 4.2 it works.

I've set this in my manifest:

android:theme="@style/Theme.Base.AppCompat.Light.DarkActionBar"

My styles.xml looks like this:

<style name="AppBaseTheme" parent="Theme.Base.AppCompat.Light.DarkActionBar">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>
    <!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

All features works. But there is no actionbar. :( I think this is a Style problem, because there are no exceptions in code.

Upvotes: 1

Views: 1287

Answers (1)

ianhanniballake
ianhanniballake

Reputation: 199805

While your theme looks correct (although most people would prefer to use Theme.AppCompat.Light.DarkActionBar for platform independence and a consistent look across all devices), per the Adding an Action Bar guide you must also make sure your activities extend ActionBarActivity, rather than Activity or FragmentActivity.

Upvotes: 1

Related Questions