android - how to declare R.color as a constant or retrieve it from the resources? -


is there way declare selector of listview constant in activity or refer constant resurces.

i have following drawerlist.setselector(android.r.color.holo_red_light); , want declare holo_red_light constant in activity or retrieve thr resources, possible?

create color.xml in res->values folder

and add following tag

<color name="holo_color">#your color hex value</color> 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -