Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between an Animator and an Animation?

It looks like both Animations and Animators allow me to animate properties (position, opacity, scale, rotation, etc) on objects, and I'm having a hard time differentiating between the use case for both. When should I use an animator versus an animation and vice versa?

like image 671
adamdport Avatar asked Jan 29 '15 17:01

adamdport


People also ask

Are Animators and cartoonists the same?

Cartoons are created by cartoonists (drawings), or animators (TV shows or short movies). Animations are created by animators.

What an animator does?

An animator produces multiple images called frames, which when sequenced together create an illusion of movement - this is known as animation. The images can be made up of digital or hand-drawn pictures, models or puppets. Animators tend to work in 2D, 3D model-making, stop-frame or computer-generated animation.

Can an artist be an animator?

A multimedia artist and animator uses electronic tools to create animation for different media outlets. They stay updated on certain technology, application and design trends to create unique graphics in their roles. Most of them work with animation teams to create and edit new visual materials.

Is it a good idea to be an animator?

Being an animator is an incredible career, where you can have the opportunity to give life to images and ideas in fields as diverse as law, healthcare, film, education, television, and gaming. Read on to see what steps you'll need to take to become an animator and how to break into this action-packed, exciting field.


2 Answers

Animations are older versions of Animators. Animators where introduced in 3.0 to help overcome some short-coming that Animations have.

Animations only change the visual representation of an object. This is fine if you're just changing opacity, but it causes issues when you translate, rotate, or scale objects. In the old days before Animators, if you translated the object, you had to perform a re-layout with the new coordinates. It could be rather difficult depending on where the object moved.

Animators on the other hand change the physical properties of the objects. This means that if you move a View to a new location, the touch coordinates will be mapped at the new location without any other intervention.

Personally, I don't use Animations much anymore unless I'm developing at API's 2.3 or less. Thankfully that's becoming less of an issue. There are also some old classes that still use Animations API especially when it comes to using xml resources such as the android.support.v4.app.FragmentTransaction class (the normal FragmentTransaction supports Animators instead).

As a side note, the project NineOldAndroids was developed to mimic functionality of Animators but using Animations so you can make apps that work all the way to 1.6.

like image 61
DeeV Avatar answered Oct 16 '22 23:10

DeeV


An Animation object animate the view's image. If you use this for example, to move a button around the screen you will not be able to click on it at the new visible position because it was not truly moved, but only his bitmap representation was translated. You will also not be able to change the proportions of it since you are making modifications to a bitmap. If you use xml files, place them at anim folder.

An Animator object animate the view's property (like the margin or width). If you use this to move a button around the screen you will be able to capture clicks on it in the new visible positions. If you use xml files, place them at animator folder.

If you only need cosmetic effects, like fade in or small appearance translation, using a Animation will be more efficient because it does not call layout() or measure() methods. If you do need to capture actions like click events, use a Animator.

like image 29
Allan Veloso Avatar answered Oct 16 '22 23:10

Allan Veloso