0
votes

I've used the following style:

http://jgilfelt.github.io/android-actionbarstylegenerator/#name=zhc_style&compat=appcompat&theme=light_dark&actionbarstyle=solid&texture=1&hairline=1&neutralPressed=1&backColor=cd0079%2C100&secondaryColor=cd0079%2C100&tabColor=cd0079%2C100&tertiaryColor=303030%2C100&accentColor=cd0079%2C100&cabBackColor=002E3E%2C100&cabHighlightColor=cd0079%2C100

Long story short, it makes the ActionBar purple.

I've taken all the files from the .zip file and placed them in my project. Within the <resources> of the file styles_zhc_style.xml I've got:

<style name="Theme.Zhc_style" parent="@style/Theme.AppCompat.Light.DarkActionBar">
    <item name="android:actionBarItemBackground">@drawable/selectable_background_zhc_style</item>
    <item name="android:popupMenuStyle">@style/PopupMenu.Zhc_style</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Zhc_style</item>
    <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Zhc_style</item>
    <item name="android:actionDropDownStyle">@style/DropDownNav.Zhc_style</item>
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Zhc_style</item>
    <item name="android:actionModeBackground">@drawable/cab_background_top_zhc_style</item>
    <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_zhc_style</item>
    <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Zhc_style</item>

            <!-- Light.DarkActionBar specific -->
    <item name="android:actionBarWidgetTheme">@style/Theme.Zhc_style.Widget</item>

</style>

I've changed my Android Manifest to the following:

<application
    android:allowBackup="true"
    android:name="com.zhc.android.ZHCApp"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.Zhc_style" >
    <activity
        android:name=".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>

My minimum sdk version is 16, my target sdk version is 21.

I still get the dark ActionBar on top of my application. When I change the settings using the Style Generator to have the Base Theme 'Light' and move all the files again, I see that the ActionBar indeed becomes light themed. Lighter ActionBar, black instead of white letters... but still no purple.

What am I doing wrong?

1

1 Answers

0
votes

I've 'solved' the problem by removing the NavigationDrawer Fragment I've used, and placed a Toolbar on top instead. (Android 5.0).

Not really a solution, but an alternative people could consider.