Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了android – 每当我滚动时ListView重绘背景颜色大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我已经定义了一个自定义主题,我在窗口背景上绘制了一个黑色渐变.我的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重绘背景颜色所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。