名单颜色变成黑色,而滚动 [英] List color turns black while Scrolling

查看:100
本文介绍了名单颜色变成黑色,而滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表中的活动而填充当我点击一个选项卡,问题是表颜色将变为黑色,而滚动它,即使我没有设置任何属性发生这样的..任何建议,以避免这个问题? 谢谢你,

I have one list activity which populates when I click on one tab, the problem is list colour turns black while scrolling it, even though i have not set any attributes to happen like that.. Any suggestions to avoid this problem? Thanks,

推荐答案

这加入的ListView 在XML文件中:

Add this to listView in the xml file:

android:cacheColorHint="#00000000"

或Java中的code:

or in Java code:

getListView().setCacheColorHint(0);

这篇关于名单颜色变成黑色,而滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆