title: ListView item get background-color of another at swipe
body: <p>I've created a ListView with a custom adapter which extends the SimpleAdapter. The fifth item is pink. When I swipe up and down, other items gets random the same background-color as the fifth one.<br>It seems very strange to me, why is that?</p>
  
  <p><strong>Screenshots:</strong><br>
  <a href="http://www.m-i-u.de/images-i66575bjkpq7.png" rel="nofollow" title="Click! ;)">Screenshot 1</a>: the app directly after start<br>
  <a href="http://www.m-i-u.de/images-i66576b5aih9.png" rel="nofollow" title="Click! ;)">Screenshot 2</a>: the App after I swiped up and down a few times
  <br><br><strong>Files:</strong><br>
  MainActivity.java:</p>
  
  <pre><code>package com.example.test;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import android.app.ListActivity;
  import android.os.Bundle;
  import android.widget.ListAdapter;
  
  public class MainActivity extends ListActivity {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          List&lt;Car&gt; cars = getData();
          ListAdapter adapter = new CarListAdapter(this, cars, android.R.layout.simple_list_item_2, new String[] {
                  Car.KEY_MODEL, Car.KEY_MAKE }, new int[] { android.R.id.text1, android.R.id.text2 });
          this.setListAdapter(adapter);
      }
  
      private List&lt;Car&gt; getData() {
          List&lt;Car&gt; cars = new ArrayList&lt;Car&gt;();
          for(int i = 0; i &lt; 15; i++) {
              cars.add(new Car("Car "+i, i+""));
          }
          return cars;
      }
  }
  </code></pre>
  
  <p><br><br>
  CarListAdapter.java:</p>
  
  <pre><code>package com.example.test;
  
  import java.util.List;
  import java.util.Map;
  
  import android.content.Context;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.SimpleAdapter;
  
  public class CarListAdapter extends SimpleAdapter {
      private List&lt;Car&gt; cars;
      private int[] colors = new int[] { 0x30ff2020, 0x30ff2020, 0x30ff2020 };
  
      @SuppressWarnings("unchecked")
      public CarListAdapter(Context context,
              List&lt;? extends Map&lt;String, String&gt;&gt; cars, int resource,
              String[] from, int[] to) {
          super(context, cars, resource, from, to);
          this.cars = (List&lt;Car&gt;) cars;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          View view = super.getView(position, convertView, parent);
  
          if (position == 5) {
              int colorPos = position % colors.length;
              view.setBackgroundColor(colors[colorPos]);
          }
  
          return view;
      }
  
  }
  </code></pre>
  
  <p><br><br>
  Car.java:</p>
  
  <pre><code>package com.example.test;
  
  import java.util.HashMap;
  
  public class Car extends HashMap&lt;String, String&gt; {
      private static final long serialVersionUID = 12872473L;
      public String make;
      public String model;
  
      public static String KEY_MAKE = "make";
      public static String KEY_MODEL = "model";
  
      public Car(String make, String model) {
          this.make = make;
          this.model = model;
      }
  
      @Override
      public String get(Object k) {
          String key = (String) k;
          if (KEY_MAKE.equals(key))
              return make;
          else if (KEY_MODEL.equals(key))
              return model;
          return null;
      }
  }
  </code></pre>
  
  <p><br><br>
  activity_main.xml:</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="@android:id/list" android:layout_width="fill_parent"
          android:layout_height="fill_parent" android:visibility="visible"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>