Actionbar does not show up in devices, but in emulator does

359 Views Asked by At

I have been developing an app and I was using an emulator as tester. When the app was finished I tested it in an Android 5 and also 4 but the Actionbar just won't show up. The platform of the emulator is 5.1.1 as the first phone where I tested it. The only thing that came into my mind is the manifest file that could contain something wrong, here it is:

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.flexenergy.swapp"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="22" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/myActionBarTheme" >
        <activity
            android:name="com.flexenergy.swapp.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Another thing, I have a drawable listview menu on the left that should appear by pressing on the actionbar (which is not shown) but it does come up if I slide a finger from left to right.

The only styles.xml is the following (and I place it in values-v22, values-v11, etc):

    <?xml version="1.0" encoding="utf-8"?>
<resources>
    <!--theme applied to the application or activity-->
    <style name="myActionbarTheme" parent="android:Theme.Holo">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
        <item name="android:actionMenuTextColor">@color/lightBlue</item>
    </style>

    <!-- actionBar styles -->
    <style name="MyActionBar" parent="android:Widget.Holo.ActionBar">
        <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
    </style>

    <!-- actionBar title text -->
    <style name="MyActionBarTitleText" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
        <item name="android:textColor">@color/lightBlue</item>
        <item name="android:textSize">20sp</item>

    </style>

    <!-- actionBar tabs text styles -->
    <style name="MyActionBarTabText" parent="android:Widget.Holo.ActionBar.TabText">
        <item name="android:textColor">@color/lightBlue</item>
    </style>

    <!--
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
    -->
    <style name="AppBaseTheme" parent="android:Theme.Light">
        <!--
            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>

</resources>
0

There are 0 best solutions below