Luis Mendo
Luis Mendo

Reputation: 112659

Colors in Holo light/dark

I want to use Holo colors for my app. For example, I'd like the divider horizontal bars to be the exact same light-gray as in other apps. I'm pretty sure there must be some place where these colors are defined as constants, so that the programmer does not have to input actual hex values. I have been reading through documentation but I haven't found it. Do you know where I can find such list of color names?

Upvotes: 3

Views: 3482

Answers (2)

tyczj
tyczj

Reputation: 73753

Most of the colors can be found in the colors.xml file which can be found in

android-sdk-windows\platforms\android-18\data\res\values

Edit:

the list seperator you are asking about is actually a drawable, you can find the style here

<style name="Widget.Holo.Light.TextView.ListSeparator" parent="Widget.TextView.ListSeparator">
    <item name="android:background">@android:drawable/list_section_divider_holo_light</item>
    <item name="android:textAllCaps">true</item>
</style>

you can find that in the drawables folder

Upvotes: 4

VenomVendor
VenomVendor

Reputation: 15382

These are the default colours avail with in android. R.color

It can be accessed programmatically by using android.R.color.colorname or from xml by @android:color/colorname

You can also define your own colors in xml file like this

Upvotes: 2

Related Questions