开发者

Slideshow in android

I am seeking some pointers开发者_运维百科 on how to create a sideshow application in Android. I need to have the Android transition animation when I switch between the images.


You can fade the images in and out (or probably use other transitions) using the Animation classes in Android. Here is something which I use

Animation animation = new AlphaAnimation(1.0f, 0.0f);
animation.setDuration(100);
animation.setRepeatCount(0);
animation.setFillAfter(true); 
myView.startAnimation(animation)

Then load the other image when this completes. You can use an AnimationListener to detect the animation end.

After the animation do the same thing but reverse the alpha values in AlphaAnimation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜