I have a problem with an ExpandableListView in my Android application. I've set a custom background color but while scrolling the list the color changes to black untill the scrolling has stopped. Is that normal or can you change the "onScrollColor"?
我遇到了此类问题,并在列表XML android:cacheColorHint = "#00000000"
使用此属性解决了该问题
Make sure you use a ViewHolder
for reuse of your Views inside your getView Method
like in this example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html
the background to this is that Android trys to reuse the Views while scrolling and if you dont obey the Caching Rules (eg Using a ViewHolder like in the example) you have that described problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.