title: On Click of of a ImageView Change the Background of the Layout Android
body: <p>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 </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
      &lt;selector 
          xmlns:android="http://schemas.android.com/apk/res/android"&gt;
              &lt;item 
                      android:drawable="@drawable/blue_bar" 
                      android:state_pressed="true"/&gt; 
              &lt;item 
                      android:drawable="@drawable/gray_bg"/&gt;
      &lt;/selector&gt;
  </code></pre>
  
  <p><strong>XML is</strong> </p>
  
  <pre><code> &lt;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" /&gt;
  </code></pre>