I would like to customize Holo theme by changing the default blue color to fit my company color.
Is there an easy way to do this?
Or I have to redefine the style of all components with blue parts, such as dialog titles, actionbar bottom line, pushed buttons, pickers, etc.
I cannot add anything more than this link:
http://android-holo-colors.com/
Android Holo Colors Generator
The Android Holo Colors Generator allows you to easily create Android
components such as editext or spinner with your own colours for your
Android application. It will generate all necessary nine patch assets
plus associated XML drawables and styles which you can copy straight
into your project. If you have any question, please refer to the FAQ
or report an issue.
;-)
As an addition to Waza Be's answer, you might want to use this for styling the Action Bar:
The Android Action Bar Style Generator allows you to easily create a simple, attractive and seamless custom action bar style for your Android application. It will generate all necessary nine patch assets plus associated XML drawables and styles which you can copy straight into your project.
This blog has an excellent tutorial on how to use it properly.
Related
Is there a way to replicate the color changing ability provided by QKSMS .
It allows a user to select a color and then changes the app color and everything to that color.This is all done dynamically the moment the user chooses a specific color.
You can try this cool online tool: http://android-holo-colors.com
This enables you to create many themes for app widgets with your preferred color. You can then change your app theme by saving values for your theme in SharesPreferences or something similar and apply them in onCreate of each activity you have in your app. You can also create the themes easily in styles.xml. For each view, it has its own style with its own attributes so you will need to learn how to edit the theme of each view you want by searching...
Hope that helps.
Some Examples:
ActionBar:
https://developer.android.com/training/basics/actionbar/styling.html
Buttons:
https://www.androidcookbook.com/Recipe.seam?recipeId=3307
SeekBar:
Android - styling seek bar
Switch:
How can I style an Android Switch?
And a lot more... You will have to search for what you want.
I have a PreferenceFragment, which displays several kinds of Preferences.
Is it possible to change that blue color of the switch which belongs to a SwitchPreference and the radio buttons, line and title of the dialog which belongs to the ListPreference by assigning own colors to style-attributes ?
My base theme is Theme.Holo by the way.
Any particular reason you do not want to use AppCompat? Recent releases of AppCompat have made many new options for theming that were not available to us in Holo. (Apart from overriding drawable assets).
If you do want to stick with Holo, http://android-holo-colors.com/ is a very nice for generating those needed assets. They also have an intelliJ plugin.
I am using actionbarsherlock for the tab view and I want to change the background image of the tab.Is there any way to do this?
I don't know if it is possible to set a drawable as background for the actionbar tabs.
But is is certainly possible to change the actionbar colors. You can use the Android Action Bar Style Generator to generate a style that contains all the colors you like.
The generator should create a zip with all the needed style and drawable files for your actionbar. You know can reference this styles in application theme or the themes for the activities that should use the style.
have you tried,
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.menu_head));
For more details, refer to this post
and this post
Edit-
Check this link, if it helps.
Yes, use setIcon():
tab1.setIcon(R.drawable.tab_home_unselect);
I am trying to more or less copy a PSD that has older controls in it with also using the ActionBar in ICS they like the old style that has the actual box instead of the underline. how would i be able to keep the holo theme and revert a control to the old styles?
Just wanted to show you how i made this happen as quick fix..
http://www.androidworks.com/changing-the-android-edittext-ui-widget
This covers the bases on how to style in depth .. and basically i built my own 9.png files..
I'm looking at how to give an app that I develop and deploy it's own look and feel. So I read about the Style and Themes on developer.android.com. After some initial success with text color, text size, background color... I seem to get stuck at changing buttons, toggle buttons... It appears to me that to change the color of a button a .9.png file must be created (possibly for the different dpi's). Looking at the artwork in the default style, I see a large number of these .9.png files. To have a consistent style they should all be updated.
Is it correct to say that defining a new style involves modifying/recreating the .9.png files?
If no, how should one go about modifying the style of these .9.png based elements?
If so, are there any tools that assist with creating a custom style? And are there any style packages that can be downloaded/purchased?
I'm not sure it's a good idea to give a new look to every UI control in your application unless you are a very experienced designer. Probably, we can't beat Google designers at their craft and it would be better to comply with existing styles adding some cool features instead of changing button colors at random.