Why my Android app don't show icon and text in ActionBar?

Viewed 2786

I'm a beginner in Android development and I trying to build my theme but I have a problem. I tried searching answers on google, d.android but to no avail.

ActionBar is changing color (this is OK), but text and icon of app doesn't show (only if I use my theme - if I use default theme everything is OK). Why?

res/values/styles.xml:

<resources xmlns:android="http://schemas.android.com/apk/res/android">

<style name="AppBaseTheme" parent="android:Theme.Light">
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <item name="android:actionBarStyle">@style/MyActionBar</item>
</style>

<style name="MyActionBar" parent="AppTheme">
    <item name="android:background">HEX COLOR</item>
    <item name="android:titleTextStyle">@style/MyTitleTextStyle</item>
</style>

<style name="MyTitleTextStyle" parent="AppTheme">
    <item name="android:textColor">#FFFFFF</item>
</style>

</resources>

Here is my AndroidManifest.xml

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

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="18" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name="com.example.appname.Intro"
            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>
2 Answers
Related