title: Android RelativeLayout change color onClick
body: <p>How do i change the color of a Relative Layout i use as a clickable on Click like the normal Button?
  Like i want a visual feedback the layout was pressed.</p>
  
  <p>I tried it with a selector bound to the background property like this:</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:state_focused="true" android:color="@android:color/black"/&gt;
     &lt;item android:state_pressed="true" android:state_enabled="false" android:color="@android:color/black" /&gt;
     &lt;item android:color="@android:color/white"/&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>and used it in the Layouts backround...</p>
  
  <p><code>android:background="@color/layout_selector"</code></p>
  
  <p>but this gives me an Inflate Exception...</p>
  
  <p>Any ideas?</p>