如何让Android ScrollView的淡入淡出边缘始终可见?
默认情况下,滚动视图的淡入淡出边缘仅在可以沿该方向滚动时才可见。如何才能使其始终可见?
我不想在上面放任何可绘制的东西或类似的东西。我想使用内置的淡入淡出边缘来完成它,可能是通过覆盖一些滚动视图函数。
By default scrollview's fading edge is visible only if it is possible to scroll in that direction. How can I make it visible at all times?
I don't want to put any drawables on top or something like that. I want to accomplish it using the builtin fading edge, probably by overriding some scrollview functions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,扩展 ScrollView 并重写这些方法(基于 Donut-release2):
为了进行比较,这是原始代码,当您接近列表末尾时,它会缩短淡入淡出的边缘:
Yes, extend ScrollView and override these methods (based on Donut-release2):
For comparison's sake, this is the original code, which shortens the fading edge as you get close to the end of the list:
您还可以使用以下代码:
You can also use the following code: