Splash screen

當 APP 載入時會有空白頁面等待,所以需要一個畫面

1.照著上面的網址步驟設定

2.新增/res/drawable 目錄,裡面放入 launch_screen.png

3.App.js 搭配 react-navigation 配置如下

Android 設置

然後

Update the MainActivity.java to use react-native-splash-screen via the following changes:

然後 Create a file called launch_screen.xml in app/src/main/res/layout (create the layout-folder if it doesn't exist). The contents of the file should be the following:

以及 Add a color called primary_dark in app/src/main/res/values/colors.xml

Last updated

Was this helpful?