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
[Image] White flickering when changing image #2570
Comments
I encountered flickering when switching between tabs when upgrading from 0.9 to master as well. It may have to do with an optimization that removes off-screen images cc @a2 |
Did anyone find a workaround for this? |
I see flickering when doing navigator.push to a new view. The images on the previous screen flicker once as the new view slides from the right. Any ideas how to fix this? My issue posted here: #3187 |
@a2 Do you have any idea here? |
I can notice a similar behavior as described by @PhilippKrone |
I have image flickering when doing tab switching in TabBarIOS on 0.15, any fix yet? |
I'm using the images for background purposes and when switching to a new scene using the navigator, it starts rendering the image mid transition. This is unfortunate, and I wouldn't mind waiting 1-2 frames for the transition to start too. |
I think it would be better to at least fade in the images. |
I wonder if the problem I'm having is related to this issue. Is there any successful workaround? Thanks! |
I'd like to note that resizeMode being set to 'cover' instead of 'contain' solved one flickering issue when the assets were being loaded for a second time. However, I experience a flicker when switching between two images, on first load. I expect this is because the image is being decoded on the fly, can anyone think of a way we can decode assets before they are being rendered, so the user won't experience a flash? |
I'm experiencing flickering on rendering the same image. It re-renders when selected the image does not change. The previously selected image becomes deselected but also does not change image. Every time the image is deselected, it flickers, even though its position has not changed and the image is the same. Is this every going to be fixed? Its been eight months now since this was raised and I feels its somewhat of a major issue. It makes apps look very unprofessional. |
We are experiencing the same issue for navigation bar icons when switching between screens using |
Just wondering if anything was in the works for this? In the meantime, I have a somewhat hacky workaround component to switch between 2 images on highlight, which works with resizeMode=contain |
@MichaelDanielTom We have switched to SVGs. Didn't notice any problems so far. |
@roman01la That's not really a solution for all though. |
@roman01la I wasn't aware that SVGs were supported, how are you using them exactly, just in an ? |
I use a background image for several sequential screens and did the following as a quick fix for each.
I know it's another hacky fix, but it helps for the mean time. @roman01la I'm curious also, how are you using svg? |
@MichaelDanielTom @blakeandrewwood We are using |
@blakeandrewwood how are you rendering the Image inside the component after doing that with |
@juanpujol you can do something like:
and in your render() function:
|
@di3goleite What if the Image component is actually a container to several view? |
I have a List using images as row background, and my fps drop to 10 while scrolling. Doesn't matter image size, rendering an image slows down the whole app. |
@ammichael I had this issue before. The problem is that image is scaled at runtime, try to render images in their original resolution (do not scale them at runtime). |
@roman01la That is interesting! How am I supposed to not scale them at runtime? At first I thought about resizing manually, but this seems wrong in many ways.. |
@ammichael For example if you want to render image at 10x10 points on 2x display, then the image should be exactly 20x20 pixels resolution. |
@roman01la Yeap. But in this case you have a fixed width and height. I just have a fixed height, since the width is the screen width. Any suggestion? |
@ammichael I would recommend to test and find out if scaled images is really the problem. If it it, then you need to figure out how to not scale them. |
Add backgroundColor to your container .I mean body , than problem fixed for me. |
Guys, for me the fix was resizing all the images to smaller sizes. Some of them was over 2000x2000, and I was using just 500x300 or so |
@ammichael that makes sense, since the image is larger, it may take a longer time to load. |
After resizing all my images, it works well.. Thanks @ammichael . |
this is not working for me! I'm using react-navigation StackNavigator on iOS (haven't tested for android) and when I swipe back to the previous view, my background image flickers. I have set it to resizeMode: cover |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
I am still struggling with this issue, I have icon that is only 26@x3 on navbar and when I try to show modal, it flickers. resizemode or nothing works. |
Same problem here in ios |
+1 |
We had the same issue on android devices (RN 0.55.4) when load local asset image first time. We have created component that shows previous source until new source is loaded for android. |
Hi,
I just updated from RN 0.8 to the current master and I'm seeing the following behaviour.
I'm showing images from the local UserDefaultsDirectory and when loading such an image, I see a very fast white flickering (I think while loading the image). This was not the case in RN 0.8. I know that the loading happens async and thus, loading times might occur. But is there any option to not have this white flickering - knowing that perhaps for 1 or 2 FPS, the view is not updated (I would prefer having the old content shown for another 1 or 2 FPS than having old content -> white screen -> new content).
My background is the following: I'm having a card which I "flip" via the Animated API. After the animation is done, I actually have to re-render the screen as otherwise, Touchable buttons are not working correctly (due to still being on the "wrong side" of the card). And while re-rendering, I get a white flickering on the position of the image (although the actual image is the same all the time, I'm rendering it in another Image component that is on the other side of the card).
Thanks
Philipp
The text was updated successfully, but these errors were encountered: