title: Listview layout background color flickers on scroll disappears on image load?
body: <p>I have a listview with a layout which has an nested layout with a different background color to the main layout. </p>
  
  <p>Inside this nested layout is an imageview. Whenever images are loaded into the view the background color of this nested layout disappears. The background does not come back until the listview is scrolled.</p>
  
  <p>Also when scrolling the listview has the images in the imageview are drawn again this sequence happens again which gives the list a flickering effect.</p>
  
  <p>I have tried setting cacheColorHint property on both the main layout and nested layout but it does not seem to change.</p>
  
  <p>Here is an example image of what the happens when loading the images/scrolling. As you can see the background color for the two items at the bottom has disappeared and the rest still have their background color.</p>
  
  <p><img src="https://i.stack.imgur.com/VKgUc.png" alt="enter image description here"></p>
  
  <p>Here is the part of the listview layout with the nested layout.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/race_entrant"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:minHeight="?android:attr/listPreferredItemHeight"
  android:paddingTop="2dip"
  android:paddingBottom="2dip"
  android:paddingRight="2dip"
  android:orientation="horizontal"
  android:descendantFocusability="blocksDescendants"
  android:cacheColorHint="#E0EAF1"&gt;
  &lt;LinearLayout
      android:layout_height="fill_parent"
      android:layout_width="50dip"
      android:orientation="vertical"
      android:id="@+id/linearLeft"
      android:paddingLeft="2dip"
      android:paddingRight="2dip"
      android:paddingTop="2dip"
      android:paddingBottom="2dip"
      android:background="#E0EAF1"
      android:cacheColorHint="#E0EAF1"&gt;
      &lt;TextView
          android:id="@+id/txtEntrantNo"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          style="@style/entrant_number"
          android:layout_gravity="center_horizontal"
          android:cacheColorHint="#E0EAF1" /&gt;
          &lt;ImageView
              android:id="@+id/imgJockey"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_gravity="center_horizontal"
              android:layout_marginTop="1dip"
              android:adjustViewBounds="true"
              android:cacheColorHint="#E0EAF1" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p>How can I stop the background color of the nested layout from disappearing like this?</p>