Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to set "custom" colors (Read 2437 times)
ChrisK
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 13th, 2015
How to set "custom" colors
May 14th, 2015 at 3:34am
Print Post  
How to use the custom colors in my values/colors.xml for text and node background colors?

node.setTextBrush(new SolidBrush(Color.BLACK));
or
nodeRoot.setBrush(new SolidBrush(Color.WHITE));

But, I'd like to use these colors that aren't in com.mindfusion.drawing.

Thanks in advance Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to set "custom" colors
Reply #1 - May 14th, 2015 at 6:57am
Print Post  
Use the public Color(int value) constructor:

Code
Select All
int resourceColor = getResources().getColor(R.color.clr1);
Brush brush = new SolidBrush(new Color(resourceColor)); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ChrisK
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: May 13th, 2015
Re: How to set "custom" colors
Reply #2 - May 14th, 2015 at 5:16pm
Print Post  
Works great! Thank you very much.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint