title: How do you change the background color of a TextView that is inside a ListView Programmatically?
body: <p>I have a ListView that contains several TextView items.  This list is created at runtime, and can vary in size.  I would like to set the background of a TextView item based on a float value generated at runtime.  I am using an ArrayAdapter.</p>
  
  <pre><code>setListAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.list_fruit,ratios));  
  final ListView listView = getListView();
  listView.setTextFilterEnabled(true);
  listView.setBackgroundColor(Color.LTGRAY);
  ((TextView) listView.getChildAt(0)).setBackgroundColor(Color.CYAN);
  </code></pre>
  
  <p>The last line throws a NullPointerException.  For some reason I cannot access this TextView inside the listView.  How am I supposed to set the background color of a TextView dynamically if I don't know the color until runtime?</p>