root-two / react-native-drawer

React Native Drawer
MIT License
2.54k stars 390 forks source link

Re-Layout flicker on initial render - Android #324

Closed lsfischer closed 7 years ago

lsfischer commented 7 years ago

Hey guys, i'm having some trouble finding this bug out

My home screen flickers a bit (like it's resizing the screen) the first time this screen renders, but if I navigate to another screen a pop back to the home screen it works just fine. If i remove the <Drawer> component the flickering goes away, so i'm assuming it comes from this component.

Does someone have any ideias as to what may cause this flickering ?

My drawer looks like this:

image

I appreciate any advice

lsfischer commented 7 years ago

I found out that this flickering problem came from having flex: 1 in my wrapped component background image, replaced it with height: Dimensions.get('window').height and the flickering stoped.

Closing this issue as it's resolved.

dev4xy commented 6 years ago

There is no other solution?

lsfischer commented 6 years ago

@dev4xy I haven't worked on this code for almost a year so I'm not entirely sure but I don't this flickering was due to the Drawer component, I think it was from the styles we had in our home page that got messed up somehow when we added the Drawer component (with flex: 1). Feel free to reopen this issue if this is something that's happening to you and you don't know why, hope somebody can give you a better help.

dev4xy commented 6 years ago

Thanks ♥