When the two activity jumps, as the second activity loads more data at startup, a short black screen time will appear before the start, and a simple way to solve the problem is to set the second activity theme to transparent. This will turn the black screen on the second activity to show the first activity interface. This is done in two steps:
The first step: 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 activity's theme to transparent--
<item name= "Android:windowistranslucent" >true</item>
</style>
<style name= "Transparent" parent= "Android:Theme.Light" >
<!--set the activity's theme to transparent--
<item name= "Android:windowistranslucent" >true</item>
</style> Step Two: Set the second activity's "Android:theme" property in Androidmanifest.xml to the theme style 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.
Solution for black screen when Android activity switch (jump)