如何缩放整个图库?
我尝试用图库视图显示图像,效果很好,现在我想添加缩放,但整个图库,而不是选定的图像。
重点是所有图像都被扩展并增加了它们之间的间距。
怎么做呢?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我尝试用图库视图显示图像,效果很好,现在我想添加缩放,但整个图库,而不是选定的图像。
重点是所有图像都被扩展并增加了它们之间的间距。
怎么做呢?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
不确定你打算如何做到这一点,但如果你只是简单地改变所有候选图像的大小,它们之间的空间会成比例地变大。
您可以尝试在图库视图中设置每个框架的样式。步骤如下:
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.
将图像放入 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.根据缩放级别从代码更改图库小部件的大小以及图像之间的空间,使其满足您的需求,这是一个很好的解决方案吗?
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?