Skip to content

Commit ccbb6d4

Browse files
committed
listner checks added
1 parent b60530b commit ccbb6d4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example/src/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22

3-
import { StyleSheet, TouchableOpacity, View, Text } from 'react-native';
3+
import { StyleSheet, TouchableOpacity, View, Text, SafeAreaView } from 'react-native';
44
import { MlkitBarcodeView } from 'react-native-mlkit-barcode';
55

66
export default class App extends React.Component {
@@ -14,7 +14,7 @@ export default class App extends React.Component {
1414

1515
render() {
1616
return (
17-
<View style={styles.container}>
17+
<SafeAreaView style={{flex:1}}>
1818
<MlkitBarcodeView
1919
enableQrScanner={this.state.enableQrScanner}
2020
style={{
@@ -29,9 +29,9 @@ export default class App extends React.Component {
2929
/>
3030

3131
<TouchableOpacity style={{width:100, height:50,}} onPress={()=>this.setState({enableQrScanner:!this.state.enableQrScanner})}>
32-
<Text style={{color:'red', fontSize:20, backgroundColor:'black'}}>{"Open SCanner"}</Text>
32+
<Text style={{textAlign:'center',color:'red', fontSize:20, backgroundColor:'black'}}>{"Toggle SCanner"}</Text>
3333
</TouchableOpacity>
34-
</View>
34+
</SafeAreaView>
3535
);
3636
}
3737
}

0 commit comments

Comments
 (0)