在衰落在Android上的滚动列表的底部? [英] Fading at the bottom of a scrollable list on Android?

查看:215
本文介绍了在衰落在Android上的滚动列表的底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还有很长的ListView带有白色背景(的android:背景=@机器人:彩色/白)和透明缓存颜色(机器人:cacheColorHint =#00000000)。两个问题:


  1. 我测试的各种设备。在旧的,褪色工作正常。但在较新的,我没有看到在所有的淡入淡出,只是一个锐截止。为什么呢?如何解决?


  2. 很多时候在我的名单排队的元素,以便有
    刚够空格在底部,该褪色不能到达
    的文本,它是不可见的。有没有一种方法,使褪色盖
    更多列表?



解决方案

找到了我自己的答案:


  1. 的android:requiresFadingEdge =垂直

  2. 的android:fadingEdgeLength =48sp

I have a long ListView with a white background (android:background="@android:color/white") and transparent cache color (android:cacheColorHint="#00000000"). Two questions:

  1. I am testing on a variety of devices. On older ones, the fade works fine. But on the newer ones, I am not seeing any fade at all, just a sharp cutoff. Why might that be and how do I fix it?

  2. A lot of the times the elements in my list line up so that there is just enough whitespace at the bottom, that the fade doesn't reach the text and is not visible. Is there a way to make the fade cover more of the list?

解决方案

Found my own answers:

  1. android:requiresFadingEdge="vertical"
  2. android:fadingEdgeLength="48sp"

这篇关于在衰落在Android上的滚动列表的底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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