title: ListView item coloring on selection not working properly in android API version 8/9
body: <p>I'm currently using a ListView to display a sort of items. I've implemented an action mode to select multiple items and to delete massively that works well in android 4.x. But when I tried with API version 8 or 9 (android 2.2.x/2.3.x), selection works internally as expected but row items are colored randomly.</p>
  
  <p>If user selects first row, internally first row is selected, but row number 4 is colored. When I click another row, this row and first one is colored. It's a strange behaviour which I expect to work normally as on 4.x devices.</p>
  
  <p>Long-click overriding to activate action mode and check long-clicked item of ListView:</p>
  
  <pre><code>@Override
  public boolean onItemLongClick(AdapterView&lt;?&gt; adapterView, View view, int position, long id) {
      if (actionMode == null) {
          listView.setOnItemClickListener(new CABClickListener());
          actionMode = startActionMode(new ListActionMode());
          // Check item pressed with long click
          listView.setItemChecked(position, true);
          view.setBackgroundColor(checkedColor);
          logger.debug("Item at pos. " + position + ", checked.");
      }
      return true;
  }
  </code></pre>
  
  <p>CABClickListener, responsible to check/uncheck items of ListView, marking them internally and changing its background color:</p>
  
  <pre><code>private final class CABClickListener implements AdapterView.OnItemClickListener {
      @Override
      public void onItemClick(AdapterView&lt;?&gt; adapterView, View view, int position, long id) {
          if (listView.isItemChecked(position)) {
              view.setBackgroundColor(checkedColor);
              logger.debug("Item at pos. " + position + ", checked.");
          } else {
              view.setBackgroundColor(uncheckedColor);
              logger.debug("Item at pos. " + position + ", unchecked.");
          }
      }
  }
  </code></pre>
  
  <p>Those classes/methods are inside the Activity, <code>listView</code> is declared in top of it.</p>
  
  <p>More considerations: </p>
  
  <ul>
  <li>Using ActionBarSherlock (it shows the CAB but I think this is not
  important here) and Roboguice, but I haven't any problem with that.   </li>
  <li><s>I was always developing with the emulator. In addition, I couldn't try my app with android 3.x (got problems with this version, emulator doesn't launch), so I don't know if the problem persists in these versions.</s> UPDATE: Tested in android 3.0 API 11, works well as on 4.x.</li>
  <li>I debugged the code and <code>View</code>s in both methods are ok, but when I call
  <code>view.setBackgroundColor(checkedColor);</code>, another <code>View</code> is colored.</li>
  </ul>
  
  <p>Any suggestion? Hope anyone can help!</p>