问题描述
嘿,我检查了大量的教程和指南,但不知何故找不到它...
Hey, I checked tons of tutorials and guides but somehow can't find it...
我需要在我的Android应用程序中包含多个图像。它就像一个图像浏览器/幻灯片。
目前我只使用ImageView和适配器在/ drawable-mdpi目录之间切换图片,使用左/右手势。有效,但没有任何影响:/
I need to include multiple images in my Android app. It's like an image viewer/slideshow.Currently I switch between pictures from /drawable-mdpi dir simply with ImageView and adapter, using gestures to left/right. Works but nothing impresive :/
基本上我可以使用类似Android(2.1)库的东西和一些图像显示动画。
Basically I could use something like Android (2.1) gallery with some image show animation.
第一个问题:在App中包含多个(50-100)全屏图像的最佳方法是什么?
1st question: what's the best way to include many (50-100) fullscreen images in App?
第二:是否可以直接对图像使用ViewFlipper动画?或者我必须以某种方式填充视图?
2nd: is it possible to use ViewFlipper animations directly to images? or do i have to somehow populate Views?
推荐答案
任何方法一次只涉及一些图像在内存中。全屏图像很大;你将耗尽RAM。
Any approach that only involves a couple of images being in memory at one time. Full-screen images are large; you will run out of RAM.
您必须使用 ImageViews
作为 ViewFlipper
的孩子。
You would have to use ImageViews
as the children of the ViewFlipper
.
我建议坚持使用你所拥有的东西,然后只应用动画。
I would recommend sticking with what you have and just apply animations.
这篇关于Android:ViewFlipper&多个图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!