Several animations in Android

I'm just starting to get animation, animation animations. I made some images with pictures rotating and moving, and all this is a lot of fun, but I don’t know what is the best approach for doing several animations.

For example, I created LinearLayout and inserted some ImageViews into it and wrote the following:

RotateAnimation imgrotate = new RotateAnimation(0,360,
           RotateAnimation.RELATIVE_TO_SELF,0.5f,
           RotateAnimation.RELATIVE_TO_SELF,0.5f);
           rotate.setDuration(2000);
           someview.setAnimation(imgrotate);
           someview.startAnimation(imgrotate);

for each image. Therefore, they all rotate. But now I want to do it. But reaidng other online sources it seems that some people use canvas for animation. What is the best way?

+3
source share
1 answer

There is no better way. You should use the simplest and easiest approach that does its job.

Canvas ' , , . , , .

+1

Source: https://habr.com/ru/post/1773632/


All Articles