Activity cancels the default animation method for interface switching (recommended)
Generally, when starting a new activity, there is a switching animation effect by default, such as the movement of the interface from right to left.
But sometimes we don't need this animation. What should we do?
The operation method is troublesome. Here I recommend one of them. As like as two peas, I am going to do the splash display to the home page Home. It is the same as the background image of the top page. The user will think that the page is still on. I will do some animations and then open the door. (there will be two more buttons on the home page, which is not the startup page at this time)
Main implementation ideas:
1. You need to set a theme without animation effect and apply it to the corresponding interface.
2. At the end of the startup page interface, you need to add a method overridependingtransition (0,0);
In splashactivity. This. Finish(); Before.
3. The startup page and the home page in GIF are the same picture (the picture of the startup page is suspended on the home page layout, using the decorview of window)
4. In style.xml, the following topics need to be added. The parent topic in parent = "apptheme" is the theme of your application, and the theme with name = "theme" is the theme to be used soon. Next, set Android: theme = "@ style / theme" on the home page to your home page (that is, the next page you start the page Jump).
5. If you need to achieve the effect in GIF to prevent the picture of the startup page from extending to the status bar, I add a placeholder layout (the height is the height of the system status bar dynamically obtained, and the code is the height obtained on the startup page).
The above is all about the default animation method (recommended) for canceling interface switching of activity brought by Xiaobian. I hope you can support more programming tips~