androidimagegalleryfading

Android fading edge disappears


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

enter image description here

enter image description here

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 linear 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?


Solution

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

    However disabling programatically seems to work:

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