图库中的每个图像的覆盖50% [英] Overlay 50% of each image in gallery

查看:125
本文介绍了图库中的每个图像的覆盖50%的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找到画廊的每个图像覆盖到50%的一种方式。
我已经成功地做​​到这一点的方法setSpacing

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));

问题是,到目前为止,我们没有看到的图像在画廊中的所选项目的权利,因为所选择的项目得到充分的展示。我想保持这种comportement(图像中选择完全显示),还看到的图像在正确的(50%,喜欢对方)。

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.

我是法国人,这是非常困难的一个问题,我解释一下,如果你没有很好的理解,请问我要更多的precision。

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.

每提前感谢您的帮助。

塞巴斯蒂安

编辑:感谢雷蒙的回答,我发现这个解决我的问题: rudolphmutter.com/?p= 31 。然而,现在这给我一个新的问题,与此相同的家伙: stackoverflow.com/questions/8598863/ 。即使我接受的答案,这适合我的问题,我仍然在等待一个解决方案,以做我想做的其他计算器的主题。

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.

推荐答案

也许你可以使用setChildrenDrawingOrderEnabled(真),那么,你的选择的图像会在画廊的顶部显示。

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

这篇关于图库中的每个图像的覆盖50%的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆