Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with inputs render #624

Open
SantiSarmiento opened this issue Aug 4, 2023 · 11 comments
Open

Problem with inputs render #624

SantiSarmiento opened this issue Aug 4, 2023 · 11 comments

Comments

@SantiSarmiento
Copy link

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:

error

build.gradle file:

build gradle

settings.gradle file:

settings gradle

MainActivity.java file:

MainActivity

launch_screen.xml file:

launch screen

proyect structure:

proyect structure

"Can you see anything wrong? Any ideas or suggestions?

@herbertcordeiro
Copy link

same problem here =/

@kelokchan
Copy link

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>

@herbertcordeiro
Copy link

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" :(

@SantiSarmiento
Copy link
Author

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

@phvasconcellos84
Copy link

phvasconcellos84 commented Aug 26, 2023

did i remake the installation, adding color.xml that i've forgot and putting android:windowIsTranslucent = true on styles.xml. Now all is fine.

@GaneshBorkar6
Copy link

GaneshBorkar6 commented Oct 6, 2023

@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.

@Digital-Human-BK
Copy link

Digital-Human-BK commented Nov 7, 2023

Has anyone found a solution? I've just hit the same error... My settings are the same as those of the post creator.

@fershibli
Copy link

fershibli commented Nov 20, 2023

Yep, same error, changing to LinearLayout just changed the error:
image

@sunjaaa
Copy link

sunjaaa commented Nov 22, 2023

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

@fershibli
Copy link

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

@fikkatra
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants