启动页黑屏解决办法

在res/values/styles.xml中添加Them

<style name="MyTheme.NoTitleBar.CustomBackground" parent="@android:Theme.Black">  
        <item name="android:windowBackground">@drawable/loading</item>  
        <item name="android:windowNoTitle">true</item>  
        <item name="android:windowFullscreen">true</item>  
        <item name="android:windowContentOverlay">@null</item>  
 </style> 

 在 AndroidManifest.xml 中设置Theme到首个启动的Activity下

     <activity
            android:name=".View.ShowView"
            android:screenOrientation="portrait" 
            android:theme="@style/MyTheme.NoTitleBar.CustomBackground">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

 

posted @ 2013-09-10 10:27  BetterMan-  阅读(293)  评论(0编辑  收藏  举报