xml Splash Screen for android。正确的方式
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml Splash Screen for android。正确的方式相关的知识,希望对你有一定的参考价值。
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/colorPrimaryDark"/>
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/ic_launcher"/>
</item>
</layer-list>
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, MainActivity.class);
startActivity(intent);
finish();
}
}
<activity
android:name=".start.SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
以上是关于xml Splash Screen for android。正确的方式的主要内容,如果未能解决你的问题,请参考以下文章
无法隐藏默认的cordova-splash screen ionic 3
WinForm(WPF) splash screen demo with C#
java #Splash Screen.java
离子服务无法获取/找不到模块'@ionic-native/splash-screen/ngx'
React-native-splash-screen 状态栏颜色(不兼容的类型)
Task :rn-splash-screen:verifyReleaseResources FAILED