In the two activity jumps, as the second activity loads more data at startup, a short black screen time appears before it starts, and the easiest way to deal with this problem is to set the subject of the second activity to Transparent, So the black screen at the start of the second activity becomes the display of the first activity interface. This is done in two steps:
Step one: Add the theme of the custom activity in Xxx/res/values/styles.xml, as follows:
[HTML] <style name= "Transparent" parent= "Android:Theme.Light" >
<!--set the theme of activity to transparent-->
<item name= "Android:windowistranslucent" >true</item>
</style>
<style name= "Transparent" parent= "Android:Theme.Light" >
<!--set the theme of activity to transparent-->
<item name= "Android:windowistranslucent" >true</item>
</style> Step Two: In Androidmanifest.xml, set the "Android:theme" property of the second activity to the theme style that you just customized. As shown below:
[HTML] <activity
Android:name= "Com.yutao.customer.CustomerActivity"
Android:label= "@string/app_name"
Android:theme= "@style/transparent" >
<activity
Android:name= "Com.yutao.customer.CustomerActivity"
Android:label= "@string/app_name"
Android:theme= "@style/transparent" > There should be no such a nasty black screen.