I want to set background color dynamically but the colour is actually a gradient which is in a xml
bg_color.xml
<?xml version="1.0" encoding="utf-8"?>
<item><shape>
<gradient android:angle="270" android:endColor="#f58c0f" android:startColor="#edbc7a" />
<stroke android:width="1dp" android:color="#929292" />
<padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" />
</shape></item>
which is inside drawable folder
how to set this xml as background.