1、在配置文件下的Activity之间加入:
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true"/>
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
2、启动页面背景在drawable目录下的launch_background.xml添加:
android:gravity="center"
android:src="@drawable/splash" />