negusoft / holoaccent

Android library to customize the Holo theme with a custom accent color

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accent is defaulting to blue.

christiancoleman opened this issue · comments

Hey I'm trying to use HoloAccent and up until a few days ago the accent has been using my custom style, but now it seems to be defaulting to the Android blue.

Does that mean you solved the problem? If so, please close the issue.

Otherwise you can explain a bit better your situation so that we may help.

Basically I'm just wondering why the color in styles.xml is not being used across all my activities.

image -
^ My viewpager (MainActivity) - the main screen where everything is accessed. (The wrong color)

image
^ This is the color being used in a branched activity. (The correct color)

The MainActivity (the one with the wrong color) I've extended as a FragmentActivity, so I was using the following code to use HoloAccent:

image

In the styles.xml I have:

image

I'm using an extended application to store some global variables and use another external image loading library, so here is the code for the importing of the style:

image

The app is using a FragmentPagerAdapter from the v4 support library and the regular action bar (non support v7). Anyways, all activities that branch from this viewpager are using the color I specified in styles.xml, but the viewpager itself is still defaulting to blue.

I've tried to explicitly set the style on the activity itself.

I've tried to change the color and the theme in the styles.xml - interestingly enough all the branched activities are affected by both the color and the parent change, but the viewpager is only affected by the the parent change.


Keep in mind this did work at one point and I have no idea what changed....

So I ended up using the AccentFragmentActivity found here: https://github.com/negusoft/holoaccent/blob/master/HoloAccentExample/src/com/negusoft/holoaccent/example/activity/AccentFragmentActivity.java

And it started to work again. O__O I'll close this case now.