3D flipping example of dialog implemented by Android
This paper realizes the 3D flipping effect of dialog in Android. Here, a simple application scenario is recorded.
design sketch
At first, my idea was to jump the interface of activity to achieve the rotation effect. I read a lot on the Internet and found that the effect was wrong. Then I saw the effect of card flight animation on Google.
It looks really good, but after taking down the demo and slowing down the flip speed, I found that it's not what I want. But the effect is the same as that in an app I saw
Then I want to change it to dialog to try the effect. I find it even worse.
The card flight animation effect is as follows:
This is achieved by switching fragments through activity. You can see that the difference is that it seems to become larger when flipping, but it's useless. It's just a visual problem after flipping.
It is said that OpenGL is troublesome and has not been used. Then I searched rotate3 danimaitons.
I found the article https://www.oudahe.com/p/24513/
Therefore, the implementation method in this article is not my original, but a reference to others. Thank the great God here.
However, this one is from the activity. I just want a dialog effect, because the 3D effect of opening the red envelope of Tim on the computer looks good. In fact, it is similar, so I took it and changed it into dialog.
For rotate3 danimaitons, this article has been very detailed. If necessary, you can refer to it.
The code of rotate3danimation is also posted here
Simply added two lines of comments
Dialog implements 3D flipping code,
Animation part of the code is to take the search of the article
Demo download
The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.