码迷,mamicode.com
首页 > 移动开发 > 详细

Android启动时闪一下黑屏或者白屏

时间:2014-07-23 16:57:11      阅读:370      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   color   使用   io   

1.设定主题,此主题为透明的,加入到res/values/styles.xml中:

<style name="Theme.AppStartLoadTranslucent" parent="android:Theme">  
            <item name="android:windowIsTranslucent">true</item> 
        <item name="android:windowNoTitle">true</item>  
</style>

 

 

2.设定android启动时使用此主题,在AndroidManifest.xml中设定:

<application  
        android:allowBackup="true"  
        android:icon="@drawable/ic_launcher"  
        android:label="@string/app_name"  
        android:theme="@style/Theme.AppStartLoadTranslucent"  
        >  
        <activity android:name=".MainActivity" android:label="@string/app_name">  
            <intent-filter>  
                 <action android:name="android.intent.action.MAIN" />    
                 <category android:name="android.intent.category.LAUNCHER" />    
            </intent-filter>  
        </activity>  
    </application> 

Android启动时闪一下黑屏或者白屏,布布扣,bubuko.com

Android启动时闪一下黑屏或者白屏

标签:android   style   blog   color   使用   io   

原文地址:http://www.cnblogs.com/mingfeng002/p/3863272.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!