Kamalone
Kamalone

Reputation: 4115

Adding action bar to my Customised theme for the Activity

In my application i created a custom theme for a activity. But that time i am not able see the action bar added to the activity. How to add the action bar to the activity when it is having a cutom theme.

Please see the code.Activity in manifest.

    <activity
        android:name=".Login"
        android:label="@string/title_activity_main"
        android:theme="@style/MyCustomTheme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Theme

<style name="MyCustomTheme" parent="android:style/Theme">
  <item name="android:windowBackground">@color/my_custom_color</item>
  <item name="android:colorBackgroundCacheHint">#dddddd</item>
  <!-- <item name="android:actionBarTabStyle">@style/MyActionBarTabStyle</item> -->
</style>

Upvotes: 0

Views: 147

Answers (1)

alex
alex

Reputation: 6409

Use the Holo theme as your parent.

<style name="MyCustomTheme" parent="android:style/Theme.Holo">

Upvotes: 2

Related Questions