滚动时的Andr​​oid的ListView产生黑色高亮文本上。如何停止? [英] Android listview produces black highlighting over text when scrolling. How to stop this?

查看:116
本文介绍了滚动时的Andr​​oid的ListView产生黑色高亮文本上。如何停止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Duplicate:

<一个href="http://stackoverflow.com/questions/2833057/background-listview-becomes-black-when-scrolling?lq=1">Background滚动时的ListView变黑

Background ListView becomes black when scrolling

我有一个列表视图中,每个项目都包含在一个白底黑字。当在Nexus One的测试,滚动时向下通读课文,一个黑色的亮点出现在文本,并使其无法读取。

I have a listview within which each item contains black text on a white background. When testing on a Nexus One, when scrolling down to read through the text, a black highlight appears over the text and makes it unreadable.

我想弄清楚这是什么设置,这样我就可以把它关掉。我不想滚动时,向下通过列表任何东西得到强调。我怎样才能做到这一点?

I am trying to figure out what is this setting so I can turn it off. I do not want anything to get highlighted when scrolling down through the list. How can I accomplish this?

感谢。

推荐答案

您可能要设置的<一个href="http://developer.android.com/intl/zh-CN/reference/android/widget/AbsListView.html#attr_android%3acacheColorHint">cacheColorHint到相同的颜色作为背景

You probably want to set the cacheColorHint to the same color as your background.

所以,当你定义你的布局,只需添加安卓cacheColorHint ='#FFF您的ListView:

So, when you're defining your layout, just add android:cacheColorHint='#fff' to your ListView:

<ListView android:id="@+id/list"
    android:cacheColorHint="#fff"
    android:background="#fff"
    ...etc />

这篇关于滚动时的Andr​​oid的ListView产生黑色高亮文本上。如何停止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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