1

while scroll the listview, the Layouts background gets flickering. that is the layout is has a background image. this image will gets invisible and reload all the time while scrolling. how to rectify this? Any Idea?

Note: its happening for inbuilt android Array Adapter too.

setListAdapter(new ArrayAdapter<String>(this,
                android.R.layout.simple_list_item_1, list_value));
Praveen
  • 88,854
  • 73
  • 175
  • 217

4 Answers4

3

Have a look at this answer, esp. the android:cacheColorHint part.

Community
  • 1
  • 1
yanchenko
  • 55,355
  • 33
  • 144
  • 163
2

If anyone is looking to it from Java (code) side, this helps: listView.setCacheColorHint(Color.TRANSPARENT);

Suraj Bajaj
  • 6,570
  • 5
  • 36
  • 49
2

The official Android site has a detailed discussion on this issue, I believe.

Michael A.
  • 4,105
  • 3
  • 25
  • 46
2

to void the flickering image background try to add android:cacheColorHint="#00000000" in the ListView

ZoharAdar
  • 464
  • 1
  • 5
  • 17