react-native-qrcode-scanner icon indicating copy to clipboard operation
react-native-qrcode-scanner copied to clipboard

Resize camera view

Open liljosi opened this issue 6 years ago • 5 comments

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?

liljosi avatar Oct 11 '18 21:10 liljosi

Maybe related to: https://github.com/moaazsidat/react-native-qrcode-scanner/issues/134

tannera avatar Oct 17 '18 07:10 tannera

See comment in https://github.com/moaazsidat/react-native-qrcode-scanner/issues/134#issuecomment-454055952

ducbka02 avatar Jan 14 '19 16:01 ducbka02

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

gbalduzzi avatar Jan 31 '19 09:01 gbalduzzi

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.

howieyoung avatar Feb 15 '19 18:02 howieyoung

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>
        }
      />

jhoanborges avatar Nov 01 '19 16:11 jhoanborges