如何在博览会上使用简介动画“ splash”

时间:2019-04-04 20:56:30

标签: react-native expo

我需要将image.gif与我的应用程序一起使用(简介)

{
  "expo": {
    "name": "-----------",
    "slug": "-----------",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "landscape",
    "icon": "./assets/images/icono.png",
    "splash": {
      "image": "./assets/images/splasho.gif",
      "resizeMode": "cover",
      "backgroundColor": "#000000"
    },

我无法使用image.gif帮助...

1 个答案:

答案 0 :(得分:0)

png仅提供splash类型的文件。

{
  "splash": {
    /* 
      Color to fill the loading screen background
      6 character long hex color string, eg: "#000000" 
    */
    "backgroundColor": STRING,

    /* 
      Determines how the "image" will be displayed in the splash loading screen. 
      Must be one of "cover" or "contain", defaults to `contain`. 
      Valid values: "cover", "contain" 
    */
    "resizeMode": STRING,

    /* 
      Local path or remote url to an image.
      Will fill the background of the loading/splash screen. 
      Image size and aspect ratio are up to you. Must be a .png.
    */
    "image": STRING
  }
}

如果要更改图像,请使用png格式的图像文件。