title: How to set ListView selected item alternet text color in android
body: <p>I have a custom listview with a imageview and an textview. I want when user select a item the textview color should change and all the other textview should remain default.</p>
  
  <p>here are my xmls</p>
  
  <h2>ListView.xml</h2>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;ListView
          android:id="@+id/listViewBell"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:cacheColorHint="#00000000"
          android:choiceMode="singleChoice"
          android:divider="#b5b5b5"
          android:dividerHeight="1dp"
          android:listSelector="@drawable/list_selector" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <h2>ListViewItems.xml</h2>
  
  <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="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:padding="5dip" &gt;
  
      &lt;TextView
          android:id="@+id/txt_bell_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="@string/rihanna_love_the_way_lie"
          android:textColor="@color/black"
          android:textSize="15sp"
          android:textStyle="bold"
          android:typeface="sans" /&gt;
  
      &lt;ImageView
          android:id="@+id/list_bell_image"
          android:layout_width="50dip"
          android:layout_height="50dip"
          android:src="@drawable/bronze_bell" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>