user754730
user754730

Reputation: 1340

Holo Colors on pre Holo Devices?

I am using Keyboardsurfer's Crouton class for Android. It uses the Holo Colors as Background Color (android.R.color.holo_red_light).

Now those colors only get shown on Holo Themed Devices. On the older ones it's shown as grey.

I now want to know if there is any way of getting those colors to the old devices too to use them?

Upvotes: 1

Views: 394

Answers (2)

Gabriel Ittner
Gabriel Ittner

Reputation: 1162

You can find the colors here: http://developer.android.com/design/style/color.html (mouseover to see the hex code). Save the colors you need in your colors.xml file at values. Than you can define your own Crouton styles using the color id's of the colors you saved (R.color.xxx).

Upvotes: 2

Shaiful
Shaiful

Reputation: 5673

Copy the Color values from <android-sdk-path>/platforms/android-16/data/res/values/colors.xml to your own colors.xml file - <project-dir>/res/values/colors.xml.

Now use the values as Background color (R.color.holo_red_light).

<android-sdk-path> is you android-sdk direcotry path.

Upvotes: 2

Related Questions