I have a color in my colors.xml
file which I need to use for toolbar
color
<resources>
<color name="MAIN_A">#f16264</color>
</resources>
Now I need to use MAIN_A
as a color for toolbar
.
Use this code
getSupportActionBar().setBackground(new ColorDrawable(getResources().getColor(R.color.white)));