Open liljosi opened 5 years ago
Maybe related to: https://github.com/moaazsidat/react-native-qrcode-scanner/issues/134
I have the same issues, i want to set a custom width/height but the scanner just fill the whole screen width even if is container is a 200x200 wrapper view
Got the same issue and solved it successfully I've explained it at #173, feel free to check it and hopefully it's helpful for your case.
try my code
<QRCodeScanner
reactivate={true}
reactivateTimeout={3000}
style={{height:'100%'}}
fadeIn={false}
cameraProps={{ ratio:'1:1' }}
onRead={this.onSuccess}
showMarker={true}
customMarker={<BarcodeMask
edgeColor={'#009FDA'}
animatedLineColor={'#009FDA'}
lineAnimationDuration={2000}
>
</BarcodeMask>}
//flashMode={QRCodeScanner.Constants.FlashMode.torch} .
topContent={
<Image
style={{width:100, height:100}}
source={require('../assets/sendero.png')}
/>
}
bottomContent={
<Text style={{ fontSize: 23, fontWeight:"bold", color:"#005293" }}>QR de la subasta</Text>
}
/>
What's happening?
How can you make the camera view smaller, it takes up the whole screen and it renders it horizontally
How can it be reproduced?
You can reproduce it by copying the example in the readme
Build details?