Detailed explanation and examples under splash interface of Android Development

Many app applications just downloaded now will have navigation pages before entering the main interface for displaying the company logo or promoting their own app for the first time. Effect drawing first:

First of all, explain that you can only slide right in the home page, left and right in the middle, and the last one can only slide forward. Click to experience immediately to enter the main interface, and click skip to enter the main interface. Next, add the code.

1. Add the following to the closure in APP / build.gradle:

2. Layout file: activity_ splash.xml。

3. Logic code, splashactivity.java

Summary: I remember writing such a guide page in the past. I still need to write it myself for a long time. Now there is open source! Looking at the above code, I think you should already know that this is implemented with bgabanner. But there are some small details.

1. Style = "@ style / wrapwrap" in the layout file. We need to create a new style in the values folder_ base.xml。

In addition, the following code is added to the styles.xml file to display the whole screen:

Finally, in the listing file, the following code is written to register splashactivity.

Thank you for reading, hope to help you, thank you for your support to this site!

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
分享
二维码
< <上一篇
下一篇>>