There is a color in colors.xml
without transparency. I do know that i can add transparency to colors.xml like #CC666666
. But i need to add this transparency programatically.
colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="list_section">#666666</color>
</resource>
in my Activity:
int color = getResources().getColor(R.color.list_section);
// put transparency here
myView.setBackgroundColor(color);