title: how to change the background color of a listview?
body: <p>my array list data:<br>
  John<br>
  John<br>
  Jack<br>
  Peter<br>
  Parker  </p>
  
  <p>the repeated names must have different background in the list view</p>
  
  <p>how to do that?</p>
  
  <pre><code>ArrayList&lt;listitem&gt; data=
  (ArrayList&lt;listitem&gt;)bundle.getSerializable("value");
  
  sentItems = data; //names John,John,Jack....
  
  final List&lt;listitem&gt; duplicates = new ArrayList&lt;listitem&gt;();
  Set&lt;listitem&gt; listitemSet = new TreeSet&lt;listitem&gt;(new Comparator&lt;listitem&gt;() {
  @Override
  public int compare(ListItem o1, ListItem o2) {
  return o1.getTitle().compareTo(o2.getTitle());
  }
  });
  for(ListItem c : sentItems)
  {
  if(!listitemSet.add(c))
  {
  duplicates.add(c); //similar names added to the new list
  }
  }
  </code></pre>