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
  • 90,477
  • 74
  • 177
  • 219

4 Answers4

3

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

Community
  • 1
  • 1
yanchenko
  • 56,576
  • 33
  • 147
  • 165
2

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

Suraj Bajaj
  • 6,630
  • 5
  • 34
  • 49
2

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

Michael A.
  • 4,163
  • 3
  • 28
  • 47
2

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

ZoharAdar
  • 474
  • 1
  • 7
  • 19