Closed vlkpa closed 2 years ago
Use the CLI assets generator.
Yes, I am using CLI assets generator with logo from example project.
yarn react-native generate-bootsplash src/assets/logo/bootsplash_logo_original.png --background-color=73be46
I want to migrate from react-native-splash-screen. Also removed mimap-anydpi-v26
folder as
here
Initially the logo is cut off and then a second or so after, it's corrected as here but without changing width during the asset generation.
+1
Can you publish a repository to reproduce the issue?
I fixed it by removing the width from the logo generator command:
yarn react-native generate-bootsplash assets/bootsplash_logo_original.png \
--background-color=8EF9C3 \
--assets-path=assets \
--flavor=main
@vlkpa Please publish a repository so I can help or I will close this issue, thanks.
I had the same problem, this is my workaround:
yarn react-native generate-bootsplash <PATH>
bootsplash_logo.png
from mipmap-xxhdpi
drawable-xhdpi
<item name="windowSplashScreenAnimatedIcon">@drawable/bootsplash_logo</item>
Closed? It's a bug a lot of us are experiencing.
@anija Yes, I couldn't reproduce it and didn't receive a reproduction repository, which make me think of userland issues (maybe author forgot to regenerate assets for v4?)
Hi @zoontek What does it mean to "regenerate assets"?
@Thanaen Re-run the CLI react-native generate-bootsplash
command
I was having the same issue. Moving all the generated files from mimap-*
to the respective drawable-*
folders as suggested by @anija fixed it for me.
I tried to reproduce the issue with following steps without any success. However in my project I still face the same issue.
react-native init rnbootsplash
cd rnbootsplash
yarn add react-native-bootsplash
code .
# Do Android changes as described from 1-5.
yarn react-native generate-bootsplash react.png
react-native run-android --variant release
package.json
"dependencies": {
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-bootsplash": "4.1.5"
},
Bug summary
Splash screen image is scaled.
Library version
4.1.0
Environment info
Steps to reproduce
yarn react-native generate-bootsplash src/assets/logo/bootsplash_logo_original.png --background-color=73be46
Open app styles.xml `
`
AndroidManifest.xml ` <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.ttt.mobile.android">
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher" android:allowBackup="false" tools:replace="android:allowBackup" android:usesCleartextTraffic="true" android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/BootTheme"> <meta-data android:name="com.google.ar.core" android:value="optional"/>
` android/build.gradle -same as Readme
android/app/build.gradle -same as Readme
MainActivity.java -same as Readme
Reproducible sample code