Android的衰落边缘消失边缘、Android

2023-09-03 20:54:54 作者:世上无奈千百种,唯有沉默最心酸。QQ乐园小编为大家设计一组又

我有一个pretty的奇怪的问题,并不能找到一个解决方案。这两张照片显示我的问题:

I've got a pretty weird issue and can't find a solution. These two pictures show my problem:

在第一张照片可以看到,没有衰落的边缘。如果我将底库得远一点,上小画廊切换它的位置(我实现了这个行为),现在有两个画廊衰落的边缘。

In the first picture you can see, that there is no fading edge. If I move the bottom gallery a little bit further, the upper small gallery switches its position (I implemented this behaviour) and now there is a fading edge on both galleries.

这个问题来自于小画廊。但我不明白为什么它是影响更大的画廊的衰落边缘。相同的效果显示在右侧的视线。

The issue comes from the small gallery. But I don't understand why it is affecting the fading edge of the bigger gallery. The same effect appears on the right sight.

两个画廊嵌套在一个均有直线的布局,这是在一个线性布局再次嵌套。我从来不碰值衰落的边缘。

Both galleries are nested in a linar layout, which is nested again in a linear layout. I never touch the values for the fading edge.

是否有人有一个想法如何解决这个问题?

Does somebody have an idea how to fix the issue?

感谢您!

推荐答案

看来衰落会自动添加和禁止通过XML不起作用。

It seems the fading is added automatically and disabling through XML doesn't work.

但禁止编程似乎工作:

Gallery carousel = (Gallery)findViewById(R.id.image_carousel);
carousel.setHorizontalFadingEdgeEnabled(false);