title: Android:ListView Selector not working properly
body: <p>I am trying to apply selector to my list view ,it is a custom list view, I tried so many options but nothing worked. Any help will be greatly appreciated. I am attaching my code. Thanks in Advance </p>
  
  <p><strong>selector_listview.xml</strong></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_pressed="true" android:drawable="@drawable/faintblue" /&gt;
      &lt;item android:state_focused="true" android:drawable="@drawable/yellow" /&gt;
  
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>layout_listview.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#ffffff" &gt;
  
      &lt;ListView
          android:id="@+id/lvChatList"
          android:layout_width="match_parent"
          android:layout_height="fill_parent"
          android:layout_below="@+id/rlHeader"
          android:background="@drawable/selector_expandable_listview"
          android:listSelector="@drawable/selector_expandable_listview" &gt;
  
      &lt;/ListView&gt;
  
      &lt;TextView
          android:id="@+id/tvNoChats"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:text="No Chats"
          android:visibility="gone" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>yellow background effect takes place effectively but blue effect is not taking place,Please help
  Thanks in advance </p>