如何重叠与垂直画廊水平画廊画廊、水平

2023-09-07 13:05:40 作者:何以笙箫默

我是一个Android的新手,我正在寻找一个解决方案,如何与一个垂直滚动的图像画廊重叠水平滚动的图像画廊。这意味着垂直滚动画廊的一个透明的形象应该重叠水平滚动画廊(如交叉)中的一个图像。

I'm an android-newbie and I'm looking for a solution, how to overlap a horizontal-scrolling image-gallery with a vertical-scrolling image-gallery. that means one transparent image of the vertical-scrolling gallery should overlap one image of the horizontal-scrolling gallery (like a cross).

此外,应该可以滚动垂直或水平,以使垂直滚动画廊或水平滚动像册的图像的图像将改变。有没有一种办法?

furthermore it should be possible to scroll either vertical or horizontal so that the image of the vertical-scrolling gallery or the image of the horizontal-scrolling gallery will change. is there an way ?

非常感谢!

推荐答案

只是一个想法,而是像这样一个3x3的表格布局是什么:

Just an idea, but what about a 3x3 table layout like so:

- VG -

HGIVHG

- VG -

其中VG是指垂直画廊,HG是水平的画廊,IV是一个图像视图, - 只是一个空的框架布局

where VG means vertical gallery, HG is horizontal gallery, IV is an image view and -- is just an empty frame layout.

现在,你有两个图像列表,垂直和水平列表。你还记得图像列表的状态并始终认识您的数据模型聚焦图像。两个聚焦图像是由在中心的图像视图,而其余的图像被分布在相邻的画廊。这是一个有点的努力,但应该工作。

Now, you have two image lists, the vertical and the horizontal list. You remember the image list states and always recognize the focused images in your data model. The two focused images are composed in the centered image view, whereas the remaining images are distributed in the adjacent galleries. It's a bit of effort but should work.

 
精彩推荐
图片推荐