1. Set style
///1, set the background map theme
1 <style name= "theme.appstartload" parent= "Android:theme" > 2 <item name= " Android:windowbackground "> @drawable/ipod_bg</item> 3 <item name=" Android: Windownotitle ">true</item> 4 </style>
2. Set Transparent theme
1 <style name= "theme.appstartloadtranslucent" parent= "Android:theme" > 2 <item Name= "Android:windowistranslucent" >true3 <item name= "Android:windownotitle" > True</item> 4 </style>
I've defined two types of theme, the first of which is to set a background map. When the program starts, this background image is displayed first to prevent a black screen from appearing. The second kind of theme is to set the style to transparent, the program will not be black screen after startup, but the whole transparent, wait until the interface is initialized to show it once. Here are the pros and cons of two ways:
- The THEME1 program starts quickly, the interface displays the background map first, and then refreshes the other interface controls. Give people a refreshing feeling of being out of sync.
- Theme2 give the program start slow feeling, the interface once brush out, refresh synchronization.
2, modify the Androidmanifest.xml
To make the above theme effective, we need to set up some activity theme
1<Application2Android:allowbackup= "true"3android:icon= "@drawable/ipod_icon"4Android:label= "@string/app_name"5Android:launchmode= "Singletask" >6 7<!--ipod main screen--8<Activity9Android:name= "Com.apical.apicalipod.IPodMainActivity"Ten<!--use the styles defined above mythou--> OneAndroid:theme= "@style/theme.appstartload" AAndroid:label= "@string/app_name" > -<intent-filter> -<action android:name= "Android.intent.action.MAIN"/> the<category android:name= "Android.intent.category.LAUNCHER"/> -</intent-filter> -</activity> - + //...... - +</application>
Android boot white screen or black screen flash solution