JohnyTex
JohnyTex

Reputation: 3481

Link color to other color xml in Android

Can you link one color to another color in Android xml?

Something like this:

<color name="ring_enabled_color"><color name="ring_disabled_color"/></color>

Upvotes: 3

Views: 717

Answers (1)

Blackbelt
Blackbelt

Reputation: 157437

Can you link one color to another color in Android xml?

yes you can, using @color/color_name. E.g.

<color name="ring_enabled_color">@color/ring_disabled_color</color>

Upvotes: 4

Related Questions