I have a RelativeLayout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:background="@drawable/animated_bg">
and I've defined a selector
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/ripple_color">
<item>
<selector>
<item android:state_pressed="true"
android:drawable="@color/grey_1" />
<item android:state_focused="true"
android:drawable="@color/grey_1" />
<item android:drawable="@color/white" />
</selector>
</item>
but when I press the layout it doesn't change color.
Anyone could notice why this is happening?
Update
Here is full xml file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/container"
android:layout_centerInParent="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:background="@drawable/animated_bg">
<RelativeLayout>
<RelativeLayout>
<ImageView />
<LinearLayout>
<TextView />
<TextView />
</LinearLayout>
</RelativeLayout>
<LinearLayout >
<LinearLayout >
<RelativeLayout >
<ImageView />
<TextView />
<TextView />
<TextView />
</RelativeLayout>
<RelativeLayout >
<ImageView />
<TextView />
<TextView />
</RelativeLayout>
</LinearLayout>
<LinearLayout >
<RelativeLayout >
<TextView />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>