skip to Main Content

I am trying to create a splash screen. I am following the official documentation.

https://docs.expo.dev/develop/user-interface/splash-screen-and-app-icon/

and

https://docs.expo.dev/versions/latest/sdk/splash-screen/#configuration

i am running prebuild and running in android emulator

the splash screen just appear as a small image in the center, how can i make it full screen?

here is my app.json

{
  "expo": {
    "name": "my-app",
    "slug": "my-app",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "userInterfaceStyle": "light",
    "newArchEnabled": true,
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#232323"
    },
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/images/adaptive-icon.png",
        "backgroundColor": "#232323"
      },
      "package": "com.rasyidialwee.my-app"
    },
    "web": {
      "favicon": "./assets/images/favicon.png",
      "bundler": "metro"
    },
    "plugins": [
      "expo-router",
      "expo-font",
      [
        "expo-splash-screen",
        {
          "backgroundColor": "#232323",
          "image": "./assets/images/splash.png",
          "dark": {
            "image": "./assets/images/splash.png",
            "backgroundColor": "#232323"
          },
          "resizemode": "contain"
        }
      ]
    ]
  }
}

2

Answers


  1. use resizeMode: "cover" instead of contain.

    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#232323"
    },
    
    Login or Signup to reply.
  2. From expo sdk 52, I have already enabled the newArchEnabled: "true".
    the documentation link is this https://docs.expo.dev/versions/v52.0.0/sdk/splash-screen/#usage
    You need to make use of same image for your splash screen, icon and favicon has your splash screen, either you insert the icon unto a plan image to center it. They already have figma template to do that for you or you make use of the webview splash-screen maker

    I will suggest you go for this first link
    https://www.figma.com/community/file/1155362909441341285
    https://buildicon.netlify.app/

    but if you still want to make use of different images for your icon and splash screen you will need to downgrade to v51. But your expo go app won’t work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search