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

When I navigate to a new screen in the stack, it sets an opacity color on this screen until it gets focus for example with an input #1796

Open
davidgvf opened this issue Jun 19, 2023 · 16 comments
Assignees
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided

Comments

@davidgvf
Copy link

davidgvf commented Jun 19, 2023

Description

When I navigate to a new screen in the stack, it sets an opacity color on this screen until it gets focus for example with an input

image

image

Steps to reproduce

  1. Navigate to profile
  2. Look screen whit opacity
  3. Go to other route
  4. go back to profile and show screen correctly

image

image

Snack or a link to a repository

s

Screens version

3.21.0

React Native version

0.71.11

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

Android emulator

Device model

pixel 3

Acknowledgements

Yes

@github-actions github-actions bot added Missing info The user didn't precise the problem enough Platform: Android This issue is specific to Android Missing repro This issue need minimum repro scenario Repro provided A reproduction with a snack or repo is provided and removed Missing repro This issue need minimum repro scenario Missing info The user didn't precise the problem enough labels Jun 19, 2023
@kkafar
Copy link
Member

kkafar commented Jun 19, 2023

Hi @davidgvf, would you mind posting a reproduction?
The link you provided points to not existing resource (404) - my guess is that the repo is private. Also my guess is that you posted version of react-navigation in Screens version section, as version 6.21.0 of react-native-screens does not exist yet. Please update the issue template with adequate version.

@davidgvf
Copy link
Author

davidgvf commented Jun 19, 2023

I detect, that problem ocurring when install @stripe/stripe-react-native @kkafar

Version updated

@kkafar
Copy link
Member

kkafar commented Jun 19, 2023

Does that mean that the problem is resolved?

@kkafar kkafar self-assigned this Jun 19, 2023
@davidgvf
Copy link
Author

davidgvf commented Jun 19, 2023

The problem continues XD, but I have only realized that it conflicts with this library @kkafar and only in android

@kkafar
Copy link
Member

kkafar commented Jun 19, 2023

Ok, I'm awaiting for requested reproduction.

@davidgvf
Copy link
Author

Is it okay if I upload a video here? @kkafar

@kkafar
Copy link
Member

kkafar commented Jun 19, 2023

It would not help much. Please see this article.

@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Jun 20, 2023
@intergalacticspacehighway
Copy link
Contributor

@kkafar @davidgvf we had seen similar opacity issue and without stripe. I tried reproducing but was unsuccessful. I'll try again. It gets resolved when i changed the default fade animation type for android. showtime-xyz/showtime-frontend#2213

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jul 4, 2023
@kkafar kkafar added the Close when stale This issue is going to be closed when there is no activity for a while label Jul 6, 2023
@hirbod
Copy link
Contributor

hirbod commented Jul 11, 2023

This is not stale

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Jul 11, 2023
@hirbod
Copy link
Contributor

hirbod commented Jul 14, 2023

Just ran into this multiple times today. Sometimes, it even keeps the opacity at 0, even after the screen transition was finished. Only way to prevent this for us is to set animationDuration to undefined for android.

@davidgvf
Copy link
Author

davidgvf commented Jul 14, 2023 via email

@hirbod
Copy link
Contributor

hirbod commented Jul 14, 2023

Not 0, just undefined.

The only way we could workaround was like so:

        <Stack.Screen
          name="comments"
          options={{
            headerTitle: "Comments",
            animation: Platform.OS === "android" ? "fade_from_bottom" : "simple_push",
            animationDuration: Platform.OS === "android" ? undefined : 200,
          }}
          component={CommentsScreen}
        />

@davidgvf
Copy link
Author

Hi, i detect the problem in my case, if you have lib @react-native-community/blur, If you use the excessive style for the blurview, and you do not remove that component, that is, it is always rendered, in my case I used it for the toast notifications, the navigation behaves strange, putting screens in white or in x color

@simonbothen-radinn
Copy link

@davidgvf Could you please elaborate your statement? We also use @react-native-community/blur and has animation/color problem, but couldn't figure out explicitly what you're solution is?

@davidgvf
Copy link
Author

davidgvf commented Oct 6, 2023

@simonbothen-radinn If you use blurview on android on any screen, this will cause those animation failures or making the screen blank, unless you remove it when you go to browse, it is if it remains active while browsing

@robvan2
Copy link

robvan2 commented Jan 31, 2024

Not 0, just undefined.

The only way we could workaround was like so:

        <Stack.Screen
          name="comments"
          options={{
            headerTitle: "Comments",
            animation: Platform.OS === "android" ? "fade_from_bottom" : "simple_push",
            animationDuration: Platform.OS === "android" ? undefined : 200,
          }}
          component={CommentsScreen}
        />

This workaround did it in my case + i had to add style={{flex: 1}} to GestureHandlerRootView & SafeAreaProvider that were above NavigationContainer (i had multiple nested navigators ( inner stack <- root stack -> drawer -> tabs )) when i went from the tabs to a screen in the inner stack the problem occurred ... also i have stripe installed.

@hirbod Thanks dude

My case (sometimes it works sometimes it doesn't) (S21Fe Android 13)

Screen_Recording_20240130_114707_Expo.Go.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

6 participants