4
votes

To style my android application an make it more beautiful, i have used the action bar style generator to create a theme and Action holo color generator

They both give me a res folder when i extract and i want to use both of them in my application, but am not sure if thats allowed or would create some conflicts.

I would like to know how i can include both of them in my app. Thanks

2
There is no 3rd party tool available for this, you have to do it manually, copy/paste all the files into the particular folder and you have to merge styles.xml into your actual project styles.xml file.Paresh Mayani
how do i edit my manifest file to use these two?SamAko
Sorry there is no ready made tool available which can you give you ready manifest file by merging!Paresh Mayani

2 Answers

5
votes

There is a pretty good write up on how to do this - have a look at this: http://www.androiduipatterns.com/2012/09/creating-custom-android-styles-easy-way.html

1
votes

As the link in Wayne May's answer suggests, you just have to make the ActionBar theme extends the Holo color's theme.

Here are the steps needed to get this to work:

  1. Chose a prefix for your themes (the last part of your app's package name for example)
  2. Generate and download a theme for you action bar using ActionBarStyleGenerator. Name this theme <prefix>_ActionBar.
  3. Generate and download a theme for your widgets using Android Holo Colors Generator. Name this theme <prefix>_Widgets.
  4. Unzip the files you downloaded in your resource folder (be careful not to overwrite anything).
  5. Edit the files values/<prefix>_actionbar_styles.xml and values-v14/<prefix>_actionbar_styles.xml to replace every occurrence of parent="@style/Theme.AppCompat" with parent="@style/<prefix>_Widgets"
  6. Use <prefix>_ActionBar as your theme (or as your theme's parent)