title: how to customize listview row android
body: <p>i have a names list and i want to change the color to the rows depending on the letter the name starts with. This is what i'm using to show the ListView:</p>
  
  <p><strong>main.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      &gt;
  
  &lt;ListView android:id="@+id/listview"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content" 
       /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>lisviewrows.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  &lt;/TextView&gt;
  </code></pre>
  
  <p><strong>main.java</strong></p>
  
  <pre><code>public class Main extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          List&lt;String&gt; words = populateList();
          List&lt;String&gt; l = removeDoubles(words);
          Collections.sort(l);
  
          ListView lv = (ListView)findViewById(R.id.listview);
  
          ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(), R.layout.listviewrows, l);
  
          lv.setAdapter(adapter);
  
          lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {
  
              }
          });
      }
  </code></pre>
  
  <p>Is there some useful link you can provide me with or some example?</p>
  
  <p>Thanks!!</p>