Android uses theme to customize the switching animation between activities
The animation switching effect between default activities of most Android systems is: slide in on the right and slide out on the left; Sometimes our requirement may be to switch all activities to fade in and fade out. At this time, we may need to change the default switching style.
Let's start:
First, create the anim folder under the res folder, and then create fade in it_ in. XML and fade_ out. XML two animation resources
fade_ in. xml
fade_ out. xml
Then, under the values folder, click styles The resources tag in XML writes:
The last step is at androidmanifest Add Android: theme = "@ style / anim_fade" to the declaration of activity in XML
Paste the splash activity Code:
Source code download: http://xiazai.jb51.net/201609/yuanma/CustomAnimation (jb51.net). rar
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.