我已经定义了一个自定义主题,我在窗口背景上绘制了一个黑色渐变.我的ListVIEw背景设置为透明,但每当我滚动时,背景颜色变为黑色,然后滚动停止后,返回渐变颜色.为什么是这样?
<?xml version="1.0" enCoding="utf-8"?> <resources> <!-- Base application theme is the default theme. --> <style name="theme" parent="androID:theme"> </style> <!-- Variation on our application theme that has a translucent background. --> <style name="theme.DarkGradIEnt"> <item name="androID:windowBackground">@drawable/dark_gradIEnt</item> </style> </resources>
解决方法:
您的问题在这里得到解答:http://developer.android.com/resources/articles/listview-backgrounds.html
您只需设置cachecolorHint即可解决问题. 总结
以上是内存溢出为你收集整理的android – 每当我滚动时ListView重绘背景颜色全部内容,希望文章能够帮你解决android – 每当我滚动时ListView重绘背景颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)