Adding animations to your app interface will give high quality feel to your android applications. Animations can be performed through either XML or android code. In this tutorial i explained how to do animations using XML notations. I will explain how to do the same using android java code in future tutorials. Here i covered basic android animations like fade in, fade out, scale, rotate, slide up, slide down etc.,

Android Property Animation API. This tutorial describes xml coding of Animations in Android. The tutorial is based on Android Studio.

Animations can be applied to Views but it is also possible to apply them on the transition between activities.

Fade In

Fade Out

Zoom In

Zoom Out

Slide Up

Slide Down

Slide Left

Slide Right

Move Left

Move Right

Left In

Left Out

Push Left In

Push Left Out

Right In 

Right Out

Push Right In

Push Right Out

Bounce 

Pop

Sequential

Together

Crossfade

Cross fading is performing fade in animation on one TextView while other TextView is fading out. This can be done by using fade_in.xml and fade_out.xml on the two TextViews.

Blink

ANDROID ANIMATION PROJECT Code

The animation_activity.xml layout consists of a ScrollView and RelativeLayout (we’ll discuss this in a later tutorial) in which every animation type is invoked on the text using their respective buttons. The xml file is shown below :

animation_activity.xml

To sum up, a RelativeLayout, as the name suggests the arrangement of UI Components is relative to each other.

The Animation_Activity.java file contains the onClick Listeners for every button related to its animation type. It’s source code is given below.

Animation_activity.java

This brings an end to android animation example tutorial. You can contact me for the Android Animation Example Project.

Subscribe To Our Newsletter

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

We respect your privacy and take protecting it seriously.

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here