Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change default blue color in android holo theme to orange (or anything else)

I am using holo theme in my app:

<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />

I want to change the default blue color to orange. I thought it would be simple. However, after Googling all day, I still don't have a solution that works for me.

(Note: This should also be applicable to dialogs. By default dialog titles and lines are blue.)

Say if default is like this:

From Blue

I want to be like this:

To Orange

Please help. Thanks in advance!

EDIT

I forgot to mention that I know about the style generator at http://jgilfelt.github.com/android-actionbarstylegenerator/ That's where from I got these images. But I don't want all of this, it has a lot of images and other stuff which makes app larger in size. Let me know if there's a way to tweak the default themes.

like image 331
Suraj Bajaj Avatar asked Oct 21 '12 12:10

Suraj Bajaj


People also ask

How do I change primary color in Android?

Open themes. xml (app > res > values > themes > themes. xml). Change colorPrimary to the primary color you selected, @color/green .

How do you change the Holo light theme on Android?

To use a Holo theme, explicitly request one from your manifest on your activity or application element, e.g. android:theme="@android:style/Theme. Holo" . Your app will be displayed using the unmodified theme on all compatible Android 4.0 devices.

What is color primary variant Android?

colorPrimary and colorSecondary represent the colors of your brand. colorPrimaryVariant and colorSecondaryVariant are lighter or darker shades of your brand colors. colorSurface is used for “sheets” of material (like cards and bottom sheets) android:colorBackground is the window background color of your app.


2 Answers

This is not applicable by changing a Property because it is related to some drawable (some 9patch png). There is a really good website to build the drawable of widgets by your desired color.

Working with, is simple and straight forward and it generate PNGs for the widgets you select not all, to keep the size of your project small.

Here it is: http://android-holo-colors.com/

like image 51
mammadalius Avatar answered Oct 11 '22 19:10

mammadalius


As per your requirement use following library i think it is useful for you

PagerSlidingTabStrip

like image 25
Harshal Kalavadiya Avatar answered Oct 11 '22 20:10

Harshal Kalavadiya