react-native-splash-screen
react-native-splash-screen copied to clipboard
Problem with inputs render
I follow the steps on the github repo but the problem stills.
My problem occurs after installing and configuring React Native Splash Screen in my application. I followed all the steps correctly, and when I launch the app, the image I chose is displayed. However, when navigating between screens, if the screen contains an Input tag (I use the NativeBase library, but I also tried with the React component and encountered the same error), the app crashes and displays the following error message:
build.gradle file:
settings.gradle file:
MainActivity.java file:
launch_screen.xml file:
proyect structure:
"Can you see anything wrong? Any ideas or suggestions?
same problem here =/
Try to use this launch_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/screen" android:scaleType="centerCrop" />
</LinearLayout>
Try to use this
launch_screen.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/screen" android:scaleType="centerCrop" /> </LinearLayout>
Still the same problem, just changes that: "Class not found LinearLayout" :(
Try to use this
launch_screen.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/screen" android:scaleType="centerCrop" /> </LinearLayout>
Already try that: Class not found LinearLayout
did i remake the installation, adding color.xml that i've forgot and putting android:windowIsTranslucent = true on styles.xml. Now all is fine.
@phvasconcellos84, I'm also facing the same issue while using TextInput with navigation, as you have a workaround to this issue, I tried your approach to set android:windowIsTranslucent to true on styles.xml as,
< item name="android:windowIsTranslucent" > true </ item>
But this is still not working!
So can you please provide the code changes here, so that we can make the same changes and try this? Or else paste all the splash screen-related changes such as changes in the Android manifest file, and styles.xml file.
Has anyone found a solution? I've just hit the same error... My settings are the same as those of the post creator.
Yep, same error, changing to LinearLayout just changed the error:
it seems to crash on screens that use TextInput The following worked perfectly for me
*see links below https://stackoverflow.com/questions/76773115/relativelayout-error-from-textinput-and-launch-screen-file/76879105#76879105
it seems to crash on screens that use TextInput The following worked perfectly for me
*see links below https://stackoverflow.com/questions/76773115/relativelayout-error-from-textinput-and-launch-screen-file/76879105#76879105
You're amazing! TYSM! It worked perfectly. But why were we using this line on styles.xml
? Is this a diference on the setup for previous versions? This should be highlighted on README.md
In my case, it was due to the following line in styles.xml
. Removing this line resolved the issue:
<item name="android:editTextBackground">@layout/launch_screen</item>
This line is mentioned in some old documentation and blogposts, but is not necessary (anymore). Just adding launch_screen.xml in the layout directory, works fine.