您的位置:首页 > 移动开发 > Android开发

Android启动页面有白色过渡解决方案

2015-11-25 12:34 441 查看
总结一下2个启动页面有白色过渡解决方案:

1. 首先在项目res/values目录下创建styles.xml文件,并添加内容:
<style name="Theme.BackgroundTranslucent" parent="@android:Theme.Translucent">
<item name="android:windowBackground">@null</item>
</style>


其次,为启动页Activity添加刚才的Theme,在AndroidManifest.xml中启动页Activity注册代码中多写一行:
android:theme="@style/Theme.BackgroundTranslucent"


2. 直接删除android:theme="@style/AppTheme"

<application  

       android:name="com.jchdcp.JchdcpApplication"  

       android:allowBackup="true"  

       android:icon="@drawable/ic_launcher"  

       android:label="@string/app_name"  

       android:theme="@style/AppTheme" >  

或者是将AppTheme设置如下

<style name="AppBaseTheme" parent="android:Theme.Light"></style>  

    <!-- Application theme. -->  

    <style name="AppTheme" parent="AppBaseTheme">  

        <item name="android:windowBackground">@android:color/transparent</item>  

        <item name="android:windowNoTitle">true</item>  

    </style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: