1:在styles.xml中添加
//该主题设置背景是透明的,给人一种延迟启动的感觉
<style name="IUzero" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowIsTranslucent">true</item>//设置透明
<item name="android:windowNoTitle">true</item>
</style>
//设置背景跟启动页的背景相似,如果你的启动页是张图片那么可以直接给windowBackground这个属性设置该图片那么就不会有一闪的效果了
<style name="Splash_Theme" parent="@android:style/Theme.NoTitleBar">//主题名称
<item name="android:windowBackground">@drawable/splash_bg</item>//添加图片
<item name="android:windowNoTitle">true</item>
</style>
2:在AndroidManifest.xml中设置主题
<activity android:name=".LoginActivity"
android:theme="@style/IUzero"//这里使用styles.xml中添加的主题
//该主题设置背景是透明的,给人一种延迟启动的感觉
<style name="IUzero" parent="@android:style/Theme.NoTitleBar">
<item name="android:windowIsTranslucent">true</item>//设置透明
<item name="android:windowNoTitle">true</item>
</style>
//设置背景跟启动页的背景相似,如果你的启动页是张图片那么可以直接给windowBackground这个属性设置该图片那么就不会有一闪的效果了
<style name="Splash_Theme" parent="@android:style/Theme.NoTitleBar">//主题名称
<item name="android:windowBackground">@drawable/splash_bg</item>//添加图片
<item name="android:windowNoTitle">true</item>
</style>
2:在AndroidManifest.xml中设置主题
<activity android:name=".LoginActivity"
android:theme="@style/IUzero"//这里使用styles.xml中添加的主题