Icon:
启动图: 尺寸:1242x2436px 要求:整张(底色(渐变)+ 中心图)一起切
320x480/480x800/720x1280/1080x1920/1440x2560
drawable-hdpi 320x480 drawable-mdpi 480x800 drawable-xhdpi 720x1280 drawable- xxhdpi 1080x1920 drawable-xxxhdpi 1440x2560
修改文件android/app/src/main/res/values/styles/xml
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
<!-- <item name="windowSplashScreenBackground">@color/splashscreen_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splashscreen_logo</item> -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="colorPrimaryDark">@color/status_bar_color</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
确认android/app/src/AndroidMainifest.xml是否使用了Theme.App.SplashScreen
<activity android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|locale|layoutDirection"
android:launchMode="singleTask" android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.App.SplashScreen" android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="xinyun-cjxy" />
<data android:scheme="com.xin.yun" />
<data android:scheme="exp+comxinyuncjxy" />
</intent-filter>
</activity>
使用1440x2560尺寸图片去生成三张多倍图
打开xcode,选择项目
选择Images,空白处右键新建New Image Set,命名SplashScreen,将生成的三倍图拖入。
选择SplashScreen, command+shift+l,输入 Image View拖入到屏幕内。 选择Image View,在右侧选的Image中选择刚创建的SplashScreen图片资源。 Content Mode 选择Aspect Fill. 手动调整图片大小