0

Today I discovered a strange effect in my Xamarin Android app. The main screen of an app normally looks like this:

normal

As you can see, the main list items are transparent. But when I'm trying to scroll this small list of three items the following ugly effect appears:

bug

List selector for list is set to @color/transparent. List item background is @color/transparent, so I have NO effects when the list item is clicked/focused/enabled/disabled. I also set list android:choiceMode to none. Even with small scrolling gesture all three items are ALWAYS highlighted like this. Note: this bug only occurs when I set target framework to less than API 14 (e.g. for android 3.x support). In android 4.x everything is okay! Please help me to get rid of this.

poupou
  • 43,413
  • 6
  • 77
  • 174
Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
  • 1
    possible duplicate of [Background ListView becomes black when scrolling](http://stackoverflow.com/questions/2833057/background-listview-becomes-black-when-scrolling) – kabuko Mar 03 '14 at 22:03

1 Answers1

1

Just found the culprit, you can either set:

android:cacheColorHint="@android:color/transparent"

or:

android:scrollingCache="false"

for you ListView!

Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87