On click of the ImageView i want to change the background of the layout .How can i do this i have created the selector that is
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/blue_bar"
android:state_pressed="true"/>
<item
android:drawable="@drawable/gray_bg"/>
</selector>
XML is
<ImageView
android:id="@+id/bookButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:onClick="reviewItineary"
android:src="@drawable/book" />