Android - 具有偶数图像的图库
我在我的应用程序中使用 Gallery 对象,并且图像的大小使得画廊中一次的理想图像数量似乎是四个。三个导致空间过多,五个导致空间过小。
问题是画廊似乎专注于中心元素,因此我无法让四张图像在任何一次都适合屏幕上。即使我在释放触摸后立即手动滚动,布局也会调整,以便图像位于图库的中心。
我该如何修改这个?
PS:如果回复是“写你自己的画廊..”,我会很感激一些预先写好的画廊或来源的参考。
I am using a Gallery object in my app and the size of the images is such that four seems to be the ideal number of images in the gallery at one time. Three results in too much space and five in too little.
The problem is that the gallery seems to focus on the center element and therefore I can't get the four images to fit on screen and any one time. Even if I scroll by hand as soon as the release the touch the layout adjust so that an image is in the center of the gallery.
How can I amend this ?
P.S: If the reply is "Write your own gallery..", I'd appreciate references to some pre-written galleries or sources.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我编写了自己的
图库
。事实上,它更像是一个类似于 iPhone 上使用的PaginatedGallery
。它是我的图书馆的一部分: https://github.com/sfarooq/PaginatedGallery
I wrote my own
Gallery
. In fact, it is more of aPaginatedGallery
similar to the one used on iPhone.Its part of my library at : https://github.com/sfarooq/PaginatedGallery