Create a slideshow with ImageViewe - Android
I need to know how to create a slideshow of images using a ImageView, the names of image files are loaded from an array. So far I have tried this:
for(i=0;i<bL.length;i++){
imgView.setImag开发者_如何学编程eBitmap(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);
}
But only managed to load the last image of the array, not seeing themselves full animation.
Thanks for the help.
You should use Gallery Wigdet for this particular project.
加载中,请稍侯......
精彩评论