0

I'm looking for a way to overlay each images of the gallery to 50%. I have successfully do that with the setSpacing method

  gallery.setSpacing((int)(- this.imageWidth / 2));

The problem is that now, we don't see the image at the right of the selected item in gallery, because the selected item is fully displayed. I want to keep this comportement (image selected fully displayed), but also see the image at the right (50%, like each other).

Moreover, and it's an other problem, i'm looking for a way to display my images differently at the left of the selected element than at the right of the selected element. It's a little difficult to explain, so I have drawn the result that I want have :

http://www.hostingpics.net/viewer.php?id=678746customgallery.png

As you can see, the image at the left (yellow) of the selected one (purple) and the image at the right (pink) of the selected one (purple) are side by side because of the difference of disposition between left and right.

I'm french and it's a problem very difficult to explain for me, if you don't have well understand, please ask me for more precision.

Thanks per advance for your help.

Sébastien

EDIT : Thanks to Ramon's answer, I have found this to solve my problem : rudolphmutter.com/?p=31. However, this give me a new problem now, the same as this guy : stackoverflow.com/questions/8598863/. Even I accept the answer, that fit to my question, I'm still waiting for a solution to do what I want in the other stackoverflow's subject.

Community
  • 1
  • 1
Sébastien BATEZAT
  • 2,353
  • 26
  • 42

1 Answers1

1

maybe you can use setChildrenDrawingOrderEnabled(true), then, your selected image will be displayed at the top of the gallery.

Ramon
  • 26
  • 1
  • Thanks you very much, it's exactly what I was looking for ! I have found this to solve my problem thanks to your help : http://rudolphmutter.com/?p=31 However, this give me a new problem now, the same as this guy : http://stackoverflow.com/questions/8598863/android-gallery-control-order-of-touch-events-not-in-sync-with-getchilddrawingor – Sébastien BATEZAT Feb 05 '12 at 21:00
  • Yep, same problem here, but my gallery is not center locked, so, all the right side items are out of the screen, so, I don't have that problem with the touch area. (Sorry for my grammar) – Ramon Feb 07 '12 at 19:35