-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
[Android] headers show strange artifacts after unfocus -> focus since v3.32 #2212
Labels
Platform: Android
This issue is specific to Android
Repro provided
A reproduction with a snack or repo is provided
Comments
github-actions
bot
added
Missing repro
This issue need minimum repro scenario
Platform: Android
This issue is specific to Android
labels
Jun 26, 2024
github-actions
bot
added
Repro provided
A reproduction with a snack or repo is provided
and removed
Missing repro
This issue need minimum repro scenario
labels
Jun 26, 2024
2 tasks
@arjovanramshorst Thanks for reporting 👍 |
alduzy
added a commit
that referenced
this issue
Jun 28, 2024
## Description This PR intents to fix header shadow not being hidden after navigating back to a screen. The bug was visible when using `headerTransparent: true` option. The origin of this bug is [This PR](#2116) fixing build depracations. Setting the `elevation` on appBarLayout requires resetting the `stateListAnimator` to work properly, as opossed to deprecated `targetElevation` used before. For more info visit: https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout#setTargetElevation(float) Fixes #2212 . ## Changes - added missing `appBarLayout?.stateListAnimator` reset. ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ![Screenshot 2024-06-27 at 11 39 50](https://github.com/software-mansion/react-native-screens/assets/91994767/78c42cd3-4523-46f2-93ea-2aa4a6f4da4f) ### After ![Screenshot 2024-06-27 at 11 39 29](https://github.com/software-mansion/react-native-screens/assets/91994767/b0d32daa-ee98-438e-90cb-621bb6b13ad0) ## Test code and steps to reproduce 1. use `Test1097.tsx` repro 2. navigate into second or third screen 3. go back to the first screen ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
This was referenced Aug 1, 2024
Closed
github-merge-queue bot
pushed a commit
to valora-inc/wallet
that referenced
this issue
Aug 2, 2024
### Description Upgrades [react-native-screens to 3.33.0](https://github.com/software-mansion/react-native-screens/releases/tag/3.33.0) which contains a fix for the [header shadow display issue](software-mansion/react-native-screens#2212) on goBack. ### Screenshots | Android Before | Android After | | ----- | ----- | | ![](https://github.com/user-attachments/assets/ac4a0f71-c751-45d8-b852-adb79367f78a "Android Before") | ![](https://github.com/user-attachments/assets/ea165706-8dab-45b3-90a3-b2652014c1a6 "Android After") | ### Test plan - [x] Tested locally on Android ### Related issues - Fixes ACT-1335 - react-navigation/react-navigation#12063 (comment) ### Backwards compatibility Yes ### Network scalability N/A
ja1ns
pushed a commit
to WiseOwlTech/react-native-screens
that referenced
this issue
Oct 9, 2024
) ## Description This PR intents to fix header shadow not being hidden after navigating back to a screen. The bug was visible when using `headerTransparent: true` option. The origin of this bug is [This PR](software-mansion#2116) fixing build depracations. Setting the `elevation` on appBarLayout requires resetting the `stateListAnimator` to work properly, as opossed to deprecated `targetElevation` used before. For more info visit: https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout#setTargetElevation(float) Fixes software-mansion#2212 . ## Changes - added missing `appBarLayout?.stateListAnimator` reset. ## Screenshots / GIFs Here you can add screenshots / GIFs documenting your change. You can add before / after section if you're changing some behavior. ### Before ![Screenshot 2024-06-27 at 11 39 50](https://github.com/software-mansion/react-native-screens/assets/91994767/78c42cd3-4523-46f2-93ea-2aa4a6f4da4f) ### After ![Screenshot 2024-06-27 at 11 39 29](https://github.com/software-mansion/react-native-screens/assets/91994767/b0d32daa-ee98-438e-90cb-621bb6b13ad0) ## Test code and steps to reproduce 1. use `Test1097.tsx` repro 2. navigate into second or third screen 3. go back to the first screen ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
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
Description
After updating to react-native 0.73 I also updated many packages that weren't locked to exact versions, including react-native-screens, which introduced a bug (android only) in how headers are rendered. It only occurs when focusing a screen for the second time (the initial render looks good, but navigating away and back leads to a 'ghost' header underneath the original header. It's mostly visible because the 'ghost' header appears to have shadows, even though my app does not have shadows below headers. Every screen that renders a native stack header is affected.
Initial render (how it's supposed to look):
After switching to a different screen (tab or stack does not matter) and going back:
Steps to reproduce
headerTransparent: true
, however, it is also visible with other changes to options.Snack or a link to a repository
https://github.com/arjovanramshorst/react-native-screens-bug-repro
Screens version
3.32.0
React Native version
0.73.8
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
None
Build type
Release mode
Device
None
Device model
Every device (emulator/real/debug/release build)
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: