'How to make QRCode Scanner Camera full screen
can someone help me to make my QR Scanner full screen, here my code :
const App = () => {
const [scan,setScan] = useState(false)
const SCREEN_HEIGHT = Dimensions.get('window').height
return !scan ? (
<View style={styles.falsecontainer}>
<Pressable onPress={()=>setScan(true)}>
<Text style={styles.startButton}>Start Scan</Text>
</Pressable>
</View>
):(
<View style={styles.truecontainer}>
<QRCodeScanner
cameraStyle={[{height:SCREEN_HEIGHT}]}
/>
</View>
)
}
result of my code,
Thanks for helping me
I tried many ways to make my QR code scanner fullscreen, but i didn't work, please help me
Solution 1:[1]
Might be something wrong with the styles (truecontainer) you have given.
below code renders the camera in fullscreen mode.
<View style={{ flex: 1, backgroundColor: 'red' }}>
<QRCodeScanner
cameraStyle={{ height: height, width: width }}
/>
</View>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ravi |
