覆盖图库中每张图像的 50%
我正在寻找一种方法将图库中的每个图像叠加到 50%。 我已经使用 setSpacing 方法成功做到了这一点。
gallery.setSpacing((int)(- this.imageWidth / 2));
问题是现在,我们看不到图库中所选项目右侧的图像,因为所选项目已完全显示。我想保持这种行为(完全显示所选图像),但也看到右侧的图像(50%,彼此相似)。
此外,这是另一个问题,我正在寻找一种方法,在所选元素的左侧与所选元素的右侧以不同的方式显示图像。解释起来有点困难,所以我画出了我想要的结果:
http://www.hostingpics.net/viewer.php?id=678746customgallery.png
如您所见,左侧的图像(黄色)由于左右位置不同,所选图像(紫色)和所选图像(紫色)右侧的图像(粉色)并排。
我是法国人,这对我来说是一个很难解释的问题,如果你不太明白,请向我询问更精确的信息。
预先感谢您的帮助。
Sébastien
编辑:感谢 Ramon 的回答,我发现这可以解决我的问题: rudolphmutter.com/?p=31 。然而,这现在给我带来了一个新问题,和这个人一样:stackoverflow.com/questions/8598863/。即使我接受适合我的问题的答案,我仍然在等待一个解决方案来完成我在另一个 stackoverflow 主题中想做的事情。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许您可以使用 setChildrenDrawingOrderEnabled(true),然后,您选择的图像将显示在图库的顶部。
maybe you can use setChildrenDrawingOrderEnabled(true), then, your selected image will be displayed at the top of the gallery.