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

[ANDROID] Getting white flash on background while qr code is being generated #68

Open
tkulpa opened this issue Dec 17, 2018 · 19 comments
Open

Comments

@tkulpa
Copy link

tkulpa commented Dec 17, 2018

Ignore ActivityIndicator, I just made sure that flash isn't related to animation

dec-17-2018 22-20-08

My modal that is storing component which is storing qr code:
`const Modal = (props: Props) => (

{props.children}

)

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'yellow', //rgba(0,21,43,0.75)
alignItems: 'center',
justifyContent: 'center',
padding: 24,
} as ViewStyle,
wrapper: {
backgroundColor: 'white',
padding: 16,
paddingTop: 32,
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'stretch',
borderTopRightRadius: 24,
borderBottomLeftRadius: 24,
} as ViewStyle,
})

export default Modal`

And Im using react-navigation modal to show this on screen
only problem occurs on android emulator, ios is fine

@tkulpa tkulpa changed the title Getting white flash on background while qr code is being generated [ANDROID] Getting white flash on background while qr code is being generated Dec 18, 2018
@obetomuniz
Copy link

Same issue here

1 similar comment
@heimi-block
Copy link

Same issue here

@heimi-block
Copy link

Same issue here

Only in Andriod

@devvuphan
Copy link

same issue. Any new update for this?

@eladglobalbit
Copy link

same issue here

@Jobel91
Copy link

Jobel91 commented Jan 18, 2019

Same issue

@AGFarhat
Copy link

I had the same issue, fixed it with a little 'hack'.
Add a view component around your QR code and apply overflow:'hidden' style to it.
Let me know if that works for you too

@sertony
Copy link

sertony commented Jan 23, 2019

@AGFarhat it works. Thanks!

@mroozspace
Copy link

mroozspace commented Jan 25, 2019

I had similar issue. Component was packed in Scrollview and on generating qr code, whole screen flckered. Solution was packing qrcode in another scrollview inside parent

@Jobel91
Copy link

Jobel91 commented Jan 31, 2019

Thanks to @AGFarhat. It works !

@todorone
Copy link

todorone commented Feb 4, 2019

@AGFarhat @sertony @mroozspace @Jobel91
Followed advised pattern and have working QR code on iOS and on Android simulator, but when published, on real Android device I have blank WebView(scrollbars that being hidden within couple seconds). I have React Native 0.57. Can you please report RN version and confirm that hacks works on real Android device. Thanks!

@Jobel91
Copy link

Jobel91 commented Feb 4, 2019

@todorone , it works on Android real device, React Native version : 0.57.1

@AGFarhat
Copy link

AGFarhat commented Feb 5, 2019

@AGFarhat @sertony @mroozspace @Jobel91
Followed advised pattern and have working QR code on iOS and on Android simulator, but when published, on real Android device I have blank WebView(scrollbars that being hidden within couple seconds). I have React Native 0.57. Can you please report RN version and confirm that hacks works on real Android device. Thanks!

Yea i got that randomly one day... its weird.
Anyways i think i found a fix that works for me. Basically make sure that for props bgColor and fgColor you insert either in the form 'black' or 'white' or as 'rgb(xxx,xxx,xxx)'. try it (y)

@JherysVargas
Copy link

Ignore ActivityIndicator, I just made sure that flash isn't related to animation

dec-17-2018 22-20-08

My modal that is storing component which is storing qr code:
`const Modal = (props: Props) => (

{props.children}

)

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'yellow', //rgba(0,21,43,0.75)
alignItems: 'center',
justifyContent: 'center',
padding: 24,
} as ViewStyle,
wrapper: {
backgroundColor: 'white',
padding: 16,
paddingTop: 32,
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'stretch',
borderTopRightRadius: 24,
borderBottomLeftRadius: 24,
} as ViewStyle,
})

export default Modal`

And Im using react-navigation modal to show this on screen
only problem occurs on android emulator, ios is fine

How do you show the ActivityIndicator while the QR is generated?

@m3dwards
Copy link

For me, when the QR code is rendered it makes invisible any TextInputs. Using Expo API version 32.

I was able to take the sample code on the README of this project and replicate the issue on two android devices as the sample code includes a TextInput. It's a bit intermittent, sometimes they show and you can click on them and enter text even though you can see them and then sometimes they show after entering text.

Putting the QRCode inside a ScrollView with overflow hidden solved the problem for me so thanks for those who offered that solution to the flicker. I'd raise a specific issue but as the same solution fixed the problem for me, I suspect this might be the same bug.

@dvhai
Copy link

dvhai commented Apr 8, 2019

@AGFarhat it's work for me, many thanks

@ghost
Copy link

ghost commented Jun 27, 2019

I had the same issue, fixed it with a little 'hack'.
Add a view component around your QR code and apply overflow:'hidden' style to it.
Let me know if that works for you too

@AGFarhat it's work, thank much

@lyy199212
Copy link

same issue and it's work,very thanks

@Harshbhama
Copy link

@AGFarhat It Worked, Thanks :)

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