I have this file in my code, it is used as a card background for my RecyclerView Item.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/primary"
android:id="@+id/background_color"/>
<item android:top="200dp"
android:bottom="-300dp"
android:left="0dp"
android:right="-300dp">
<rotate
android:fromDegrees="-10"
android:pivotX="0%"
android:pivotY="100%">
<shape
android:shape="rectangle">
<solid
android:color="@color/white"/>
</shape>
</rotate>
</item>
</layer-list>
I want to change the color of id background_color. How can I do this since I can't seem to understand how to cast it to a View.
Help appreciated!