Basic Animation

Sunday, 7 October 2012 0 comments
Hey All, Welcome again. Generally as of Mobile Applications, User interface stands first and the business logic will reach the user if he got convinced with the screen designs.Android is very much User friendly and also Developer friendly too. Lets see some basic Animations available with the Android sdk.

All Animation in Android will come under a class Set. Few basic Animation used in Android are Translate,  Alpha, Scale and Rotate.

Translate

While trying to do Animation using Translate style(Making the widget to move to right or left and regaining the same state where it was already or in a new targeted position), we have to specify the Delta position from where the Animation should start and where to end. This can be given in terms of percentage. Animation will retain for the specified duration of time. "repeatcount" gives the times that Animation should do its task. And while repeating, how it should behave is obtained from the value under "repeatedMode".



Alpha

Alpha Animation is the way of making the widget to disappear and(or) appear with the specified time of transaction. For this we need to specify the "fromAlpha" and "toAlpha" values. It gives the level of how the widget should appear and(or) disappear. The value will range from 0 to 1.  Duration, repeatcount and repeatedMode will behave the same way like Translate Animation.



Scale

Scale Animation will make the widget to bulge In and(or) Out. Here we need to specify the from and to "x" position and well as from and to "y" position. Then Pivot x and y position to determine the float position of the widget. Duration, repeatcount and repeatedMode will behave the same way like above said Animation.



Rotate

Rotate is a cool animation which will make the widget to rotate in a cool way. For your widget to rotate, you need to provide the from and to degrees. Other properties are common for those Animations said above.




Happy Coding :)


0 comments:

Post a Comment

 

©Copyright 2011 Bleed in Android | TNB