简体   繁体   English

如何在Android中实现图像滚动视图?

[英]How to implement Image Scroll view in android?

I have a set of around 300 images. 我有大约300张图像。 I want to implement scroll view of images. 我想实现图像的滚动视图。 when I scroll, then next image should be displayed. 当我滚动时,应显示下一张图像。

When I went through different forums and documentation I found that there are many ways to do this. 当我浏览不同的论坛和文档时,我发现有很多方法可以做到这一点。 HorizontalScrollView, Gallery, ViewAnimator,ViewSwitcher etc Horizo​​ntalScrollView,Gallery,ViewAnimator,ViewSwitcher等

Please tell me what is best and efficient way to implement. 请告诉我什么是最佳,高效的实施方法。 I should also have the ability to zoom each individual image. 我还应该能够缩放每个单独的图像。

The Gallery widget is deprecated since Jelly Bean. 从Jelly Bean开始不推荐使用Gallery小部件。

you can use ViewPager or HorizontalScrollView for your purpose. 您可以根据需要使用ViewPagerHorizontalScrollView

From the Gallery doc: 图库文档中:

This class is deprecated. 此类已弃用。 This widget is no longer supported. 不再支持此小部件。 Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library. 其他水平滚动小部件包括支持库中的Horizo​​ntalScrollView和ViewPager。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM