Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the main difference between android.animation and android.transition package?

We can create animations using both android.animation package and android.transition package but I would like to know what is the main difference between these packages since even custom transitions also use animator's from android animation package.

like image 681
deshmanth Avatar asked Dec 04 '15 08:12

deshmanth


People also ask

What is the difference between the animation and transition?

An animation is a special effect that applies to a single element on a slide such as text, a shape, an image, and so on. A transition is the special effect that occurs when you exit one slide and move on to the next during a presentation.

What is transition animation in android?

Android's transition framework allows you to animate all kinds of motion in your UI by simply providing the starting layout and the ending layout.

What are the different animation in android?

The animations are basically of three types as follows: Property Animation. View Animation. Drawable Animation.


1 Answers

From the documentation of android.animation:

These classes provide functionality for the property animation system, which allows you to animate object properties of any type.

From the documentation of android.transition:

The classes in this package enable "scenes & transitions" functionality for view hiearchies.

From there a conclusion could be made that android.animation mostly handles individual View animation (a FAB moving left upon click, etc) while android.transition cares mostly about view hierarchy/layout transition animation (Material Design shared elements, etc).

like image 191
Hadi Satrio Avatar answered Oct 22 '22 00:10

Hadi Satrio