Open affibox opened 7 years ago
Nothing?
can confirm
I did a hack that fixes this. But it has to be done on the JAVA side.
@affibox Maybe fork and make a pull request if you haven't done that yet.
@affibox Please share fix :+1:
@obykoo @Scimonster i just saw this message. Let me see if i can tackle this in the morning. God bless
Please look at this code ''' <BarcodeScanner onBarCodeRead={this.barcodeReceived.bind(this)} style={{ width:(Dimensions.get('window').width0.95),height:(Dimensions.get('window').height0.95) }} torchMode={this.state.torchMode} cameraType={this.state.cameraType}
'''
I remember that the problem went away after hardcoding the height and width of the bardcode scanner component.
Let me know if this works.
Did it work? @Scimonster @obykoo
@affibox it works if not set width to SCREEN_WIDTH
I've encountered the same issue, this works for me:
I set <BarcodeScanner>
's width to Dimensions.get('window').width - 1
and the height to Dimensions.get('window').height - 25
where 25
is the height of the status bar. Then I placed it inside a <View>
with a background color black to at least hide the white border appearing.
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: 'black'}}>
<BarcodeScanner
onBarCodeRead={this.barcodeReceived.bind(this)}
style={{width: Dimensions.get('window').width - 1, height: Dimensions.get('window').height - 25}}
torchMode={this.state.torchMode}
cameraType={this.state.cameraType}
/>
</View>
This modules is leaving a black frame on the lower part of the app after navigating away from it. I only manage to remove the black frame after reopening the app.
Also it needs urgently a start and stop feature.