title: Getting Black Screen while Scrolling in ListView in Android
body: <p>I have one listview in which i am displaying data that i got, it run fine in emulator and scroll also. But when i test it on device at the time of scrolling it is showing black screen and after scroll stops it is in the normal readable form. I don't why this is happening. I am also attaching sample code.</p>
  
  <p>1st XML Layout :-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:padding="7dp" &gt;
  
  &lt;TextView
      android:id="@+id/item_title"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:padding="2dp"
      android:textColor="#000000"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:textSize="20dp" /&gt;
  
  &lt;TextView
      android:id="@+id/item_subtitle"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:textColor="#000000"
      android:padding="2dp"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:textSize="13dp" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>2nd ListView Layout :-It has scroll view also.</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:background="#FFFFFF"&gt;   
  
  &lt;ListView
      android:id="@android:id/list"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:drawSelectorOnTop="false" /&gt;
  
  &lt;TextView
      android:id="@android:id/empty"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="No data"
      android:textColor="#000000" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Code where i have used this layouts :-</p>
  
  <pre><code>ListAdapter adapter = new SimpleAdapter(this, HomeMenuActivity.mylist , R.layout.listdata, 
              new String[] { "Name", "Vicinity" }, 
              new int[] { R.id.item_title, R.id.item_subtitle });
  
      setListAdapter(adapter);
  
      lv = getListView();
      lv.setTextFilterEnabled(true);
  </code></pre>
  
  <p>I have static arraylist "mylist" which has the data. Please if anyone has any idea that why it shows black screen at the time of scrolling please guide me.</p>
  
  <p>Thank you
          lv.setOnItemClickListener(this);</p>