Commit 2e7c2544 by Tonk

update responsive camera

parent 7a4503ca
......@@ -4,6 +4,7 @@ import { HeaderButtons, Item } from 'react-navigation-header-buttons';
import IoniconsHeaderButton from '../../components/IoniconsHeaderButton';
import * as Permissions from 'expo-permissions';
import { Camera } from 'expo-camera';
import { width, height } from '../../constants/Layout';
export default class CameraScreen extends Component {
state = {
......@@ -48,24 +49,30 @@ export default class CameraScreen extends Component {
return <Text>No access to camera</Text>;
}
return (
<View style={{ flex: 1, backgroundColor: 'rgba(51,51,61,0.65)', padding: 50 }}>
<Text style={{ fontSize: 18, color: 'white', textAlign: 'center', marginBottom: 30 }}>Scanning</Text>
<View style={{ flex: 1, backgroundColor: 'rgba(51,51,61,0.65)' }}>
<View style={{ flex: 1, justifyContent: 'center', paddingHorizontal: 50 }}>
<Text style={{ fontSize: 18, color: 'white', textAlign: 'center', marginBottom: '5%' }}>
Scanning
</Text>
<Text style={{ fontSize: 16, color: 'white', textAlign: 'center' }}>
Scan for Create smart meter, Place the QR code inside area
</Text>
</View>
{/* Scanner */}
<View
style={{
flex: 1,
flex: 1.3,
alignItems: 'center',
top: '10%',
justifyContent: 'flex-start',
}}
>
<Camera
onBarCodeScanned={scanned ? undefined : this.handleBarCodeScanned}
style={{ width: 246, height: 246, borderRadius: 12, overflow: 'hidden' }}
style={{ width: width / 1.45, height: width / 1.45, borderRadius: 12, overflow: 'hidden' }}
flashMode={this.state.flashMode}
/>
</View>
<View style={{ flex: 1.7, justifyContent: 'center' }}>
<Button
style={{
width: 55,
......@@ -77,7 +84,6 @@ export default class CameraScreen extends Component {
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
top: '30%',
}}
onPress={() => {
this.setState({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment