Problem Analysis:
Mainly because when the application is opened, the current interface is not the first interface, before it, there is an interface launched, the only purpose of this interface is to start the main interface, it is not displayed. Nevertheless, the theme of this interface is not uniformly processed, its actionbar may be black, but then the Actionbar may be white, which leads to a sense that actionbar will blink white screen when entering the main interface.
Workaround:
Just find this interface and then change the theme of the interface, as in the following example
<resources xmlns:android= "Http://schemas.android.com/apk/res/android" > <style name= "Appbasetheme" parent= "@android: Style/theme.funui" > <item name= "Android:windowfullscreen" >true</item> </style> <!--application theme. --<style name= "Apptheme" parent= "Appbasetheme" > <!--all customizations that is not specific to a Particular api-level can go here. --<item name= "Android:actionbartabtextstyle" > @style/customactionbartabtextstyle</item> < Item Name= "Android:actionbartabstyle" > @style/settingsactionbartabview</item> <item name= "Android: Actionbarstyle "> @style/settingsbarstyle</item> <item name=" Android:actionmodestyle "> @style/ actionmodestyle</item> <item name= "Android:actionmodesplitbackground" > @android:d rawable/ic_menu_ close_clear_cancel</item> </style> <style name= "Apptheme.main" parent= "@style/apptheme" >
<!--can't be background-->.
<item name= "Android:windowbackground" > @color/window_color</item> <item name= "Android: Actionbarstyle "> @style/settingsbarstyle.main</item> </style> <style name=" Settingsbarstyle.main ">
<!--Actionbar does not display content--
<item name= "Android:displayoptions" >@NULL</item> </style></resource>
Once you've defined a app.main, find the boot screen.
<activity android:name= "com.vz.gallery3d.VzGalleryActivity" android:theme= "@style /apptheme.main " android:cleartaskonlaunch=" true "android:screenorientation=" Portrait " Android:uioptions= "Splitactionbarwhennarrow" ></activity>
There is a problem here, that is, before we set the background, you will find that jump on the face of the Actionbar hit the goal, but this time the main interface will flash white, the initial thought is, may also need to set the interface background, and then set the
<item name= "Android:background" > #000000 </item> then it seems to be a perfect solution to the problem, but again, the new problem is that you will find that the black is not at the bottom, but on the second floor. , that is, you open a picture, you will find this picture is completely covered by this black. Then replaced it with <item name= "Android:windowbackground" > @color/window_color</item> perfect problem Solving
Android-actionbar entry interface Flicker problem solved