Closed Cocoon-break closed 7 years ago
I just had the same issue.
Apparently it only happens if I use InteractionManager to render a placeholder (to finish the navigation animation) before the actual scanner is rendered
@Cocoon-break 我也遇到此问题,现在你是如何解决的?
@ncnlinh it's not work for me, i remove all 'InteractionManager' use.
黑屏啊 黑屏啊 太烦了
@Cocoon-break 解决了吗?
I have the same problem. I do not use InteractionManager.
Same behaviour here when using InteractionManager to render a placeholder for the scanner.
"react-native": "^0.30.0" "react-native-barcodescanner": "^3.1.1"
When I changed the camera view not full screen, this bug never show again.
This is not perfect but useful method.
use marginHorizontal: 1
fix the black screen problem.
<BarcodeScanner
ref={view => this.scanner = view}
onBarCodeRead={this._onBarCodeRead}
style={styles.scanner}
/>
scanner: {
flex: 1,
// 上下留个边, 否则在小米下返回的时候会出现底部黑边
marginHorizontal: 1,
}
@someok Your solution works for me. I have no idea how you figured that out, but kudos to you sir!
OMG it works!! Thanks..
<View style={{flex:1}}>
<BarcodeScanner
onBarCodeRead={this._onBarCodeRead}
style={{flex:1}}
torchMode={'off'}
cameraType={'back'}/>
</View>
fixed width wrap a view and style={{ flex: 1}}
use component in the scene,and I pop it .some thing happened.![a](https://cloud.githubusercontent.com/assets/6791439/17392309/000b3916-5a4f-11e6-93b4-751d5dba71ea.png)