Android imitation iPhone list data view refresh animation details

Because I like to add some interesting animation when jumping between different pages. Today, I inadvertently see an animation effect, which feels good. Several effect pictures are as follows: since it's fun, write in the blog, that is, the effect is similar to the switching animation effect of view in iPhone. Today, I will only introduce the effect shown above.

No more nonsense, first the effect, and then the code!!

Effect 1:

Effect 2:

Effect 3:

Effect 4: (error effect):

Effect 5 (whirl effect 1):

Effect 6 (whirl Effect 2):

After reading the effect, let's take a look at the specific code of the above effect implementation. In the middle, I will write down my own experiments and mistakes in the form of comments. Just don't make mistakes when you use them! Let's first look at the layout file used, a very simple layout:

XML / HTML code

XML / HTML code

< strong > let's look at the specific code to achieve the above effect. The order marked in the code is consistent with the effect diagram shown above: < / strong >

Java code

Finally, the title of the article says paging animation. In fact, these animations are not limited to paging. If you use interpolators and animations more flexibly, you can also make personalized applications with many animations. In addition, the animation between activities is more perfect when combined with the above, For the animation between activities, you can refer to the article I wrote earlier (the connection is as follows). I hope it will be helpful to you.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>