banner_animation

Android Animations using xml code


The Animations Api lets you create visually appealing animations and transitions in your apps. Using these animations in the right places can turn your good looking app into an outstanding and highly usable app. Adding animations can look like a challenging task but it is actually not that difficult at all . Animations can be performed through either XML or android code. In this tutorial i explained how to do animations using XML notations. Here i covered basic android animations like fade in, fade out, scale, rotate, slide up, slide down etc. Xml animations code is pretty simple and small to implement. Just use xml file into java and animation is ready.

Step to perform animation in android apps

Step 1) Create XML which define animation

create a xml file which define the animation in res ⇒ anim ⇒ animation.xml , If you dont have anim folder then create it in res directory

blink.xml

Step 2) Load the animation and set to view in activity to see blink effect

Some other useful animations as follows

1)Blink

2)ZoomIn

3)ZoomOut

4)FadeIn






5)FadeOut

6)Rotate

7)Move

8)SlideDown

9)SlideUp

10)Bounce

Enjoy Coding and Share Knowledge

Show Buttons
Hide Buttons