您好,登录后才能下订单哦!
密码登录
            
            
            
            
        登录注册
            
            
            
        点击 登录注册 即表示同意《亿速云用户服务条款》
        解决办法:给当前启动页添加一个有背景的style样式
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">@mipmap/splash</item>
<item name="android:statusBarColor" tools:ignore="NewApi">@color/white</item>
<item name="android:windowIsTranslucent">true</item>
</style>注意,在清单文件中
<activity android:name=".SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
//将window的背景图设置为空
getWindow().setBackgroundDrawable(null);
super.onCreate(savedInstanceState);
}<style name="SplashTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowDisablePreview">true</item>
</style>
/**
 * Activity屏蔽物理返回按钮
 *
 * @param keyCode
 * @param event
 * @return
 */
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
    if (keyCode == KeyEvent.KEYCODE_BACK) {
        return true;
    }
    return super.onKeyDown(keyCode, event);
}免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。