I’m new in android development and I facing with the following problem:
I have .xml vector images in drawable and I want to create several color presets for them.
As I understand it, to achieve this purpose i need to create sets of colors for presets in colors.xml and then get a certain set i need.
The question is how can I get, for example,
by "input_lines" name from image.xml file?
I tried to use
*"@android:color/input_lines", "@colors/input_lines" and "@android:R.color.input_lines"* but it doesn’t work
if you are talking about referring to a color that is from
colors.xml into another
.xml file , then it’s
but if you are referring to that color from activity then it’s
int color1 = getResources().getColor(R.color.input_lines);
Answered By – abdo Salm
Answer Checked By – Cary Denson (Easybugfix Admin)