如何缩放整个图库?

发布于 2025-01-06 21:47:37 字数 95 浏览 3 评论 0 原文

我尝试用图库视图显示图像,效果很好,现在我想添加缩放,但整个图库,而不是选定的图像。

重点是所有图像都被扩展并增加了它们之间的间距。

怎么做呢?

I try to display images with gallery view and it works fine, now I would like to add a zoom but the WHOLE gallery, not selected image.

The point is that all images are expanded and increased spacing between them.

How to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

撩动你心 2025-01-13 21:47:37

不确定你打算如何做到这一点,但如果你只是简单地改变所有候选图像的大小,它们之间的空间会成比例地变大。

您可以尝试在图库视图中设置每个框架的样式。步骤如下:
1. 重写gallery适配器,实现getView函数。
2.对于imageView,setLayoutParams,setScaleType,这两个都可以在imageView doc中引用,阅读doc并调整params。

Not sure how you plan to do it, but if you just simply change all the candidate image size, the space among them would get bigger proportionally.

You can try setup the style of each frame in the gallery view. Steps are like:
1. override the gallery adapter, implement the getView funciton.
2. for imageView, setLayoutParams, setScaleType, both of which can be reference in the imageView doc, read the doc and adjust the params.

单身狗的梦 2025-01-13 21:47:37

将图像放入 WebView 中。实际上制作引用本地图像的html页面,将其放入 > 中元素,并让 WebView 提供缩放功能。这将是快速的、硬件加速的,并且将根据您的需要进行缩放。

Put images into WebView. Actually make html page referencing your local images, put it into <table> element, and let WebView provide zooming. This will be fast, hw-accelerated, and will zoom as you desire.

泅渡 2025-01-13 21:47:37

根据缩放级别从代码更改图库小部件的大小以及图像之间的空间,使其满足您的需求,这是一个很好的解决方案吗?

Would it be good solution to change size of Gallery widget from code as well as space between images, according to zoom level, so it fits to your needs?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文