0
我需要知道如何使用ImageView创建图像幻灯片,图像文件的名称是从数组中加载的。到目前为止,我已经试过这样:使用ImageViewe创建幻灯片 - Android
for(i=0;i<bL.length;i++){
imgView.setImageBitmap(bitmap);
a = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, +1.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f);
a.setDuration(5000);
imgView.startAnimation(a);
}
但只有管理加载数组的最后一个图像,没有看到自己完整的动画。
感谢您的帮助。
你看过图库小部件吗? – JesusFreke
imageview一次只能保存一张图片!这样的答案可能会有所帮助 - http://stackoverflow.com/questions/3373536/using-the-android-gallery-as-an-automated-slideshow/3376203#3376203 – Raunak
正试图不断滑动一组图像? – blessenm