Android Animation ExampleAndroid provides a large number of classes and interface for the animation development. Most of the classes and interfaces are given in android.animation package. Android Animation enables you to change the object property and behavior at run time. There are various ways to do animation in android. The AnimationDrawable class provides methods to start and end the animation. Even, you can use time based animation. Let's have a look at the simple example of android animation. activity_main.xmlYou need to have a view only. File: activity_main.xml File: logo.xml Have a image view only. MainActivity classFile: MainActivity.java You need to create animation.xml file inside res/drawable-hdpi directory. You need to have many images. Here, we are using 14 images and all the 14 images are located inside res/drawable-mdpi directory. File: animation.xml Output:Next TopicAndroid Web Service |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India