I have a layout like this:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/user_color">
<shape android:shape="rectangle">
<solid android:color="#000000" />
</shape>
</item>
<item android:right="25dp">
<shape android:shape="rectangle">
<solid android:color="@color/user_background" />
</shape>
</item>
</layer-list>
How I'm calling the shape:
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/shape">
How can I programmatically change the color of the rectangle shape with id user_color
?