mirror of
https://github.com/status-im/react-native-camera.git
synced 2025-02-24 09:48:17 +00:00
Update RNCamera.md
This commit is contained in:
parent
160e1e5277
commit
cd3fcf5c31
@ -13,7 +13,7 @@ import {
|
|||||||
Dimensions,
|
Dimensions,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableHighlight,
|
TouchableOpacity,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { RNCamera } from 'react-native-camera';
|
import { RNCamera } from 'react-native-camera';
|
||||||
@ -26,20 +26,21 @@ class BadInstagramCloneApp extends Component {
|
|||||||
ref={ref => {
|
ref={ref => {
|
||||||
this.camera = ref;
|
this.camera = ref;
|
||||||
}}
|
}}
|
||||||
style={{
|
style = {styles.preview}
|
||||||
flex: 1,
|
type={RNCamera.Constants.Type.front}
|
||||||
}}
|
|
||||||
type={RNCamera.Constants.Type.back}
|
|
||||||
flashMode={RNCamera.Constants.FlashMode.on}
|
flashMode={RNCamera.Constants.FlashMode.on}
|
||||||
permissionDialogTitle={'Permission to use camera'}
|
permissionDialogTitle={'Permission to use camera'}
|
||||||
permissionDialogMessage={'We need your permission to use your camera phone'}
|
permissionDialogMessage={'We need your permission to use your camera phone'}
|
||||||
/>
|
/>
|
||||||
|
<View style={{flex: 0, flexDirection: 'row', justifyContent: 'center',}}>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={this.takePicture.bind(this)}
|
onPress={this.takePicture.bind(this)}
|
||||||
|
style = {styles.capture}
|
||||||
>
|
>
|
||||||
<Text> SNAP </Text>
|
<Text style={{fontSize: 14}}> SNAP </Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,7 +57,22 @@ class BadInstagramCloneApp extends Component {
|
|||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
flexDirection: 'row',
|
flexDirection: 'column',
|
||||||
|
backgroundColor: 'black'
|
||||||
|
},
|
||||||
|
preview: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'flex-end',
|
||||||
|
alignItems: 'center'
|
||||||
|
},
|
||||||
|
capture: {
|
||||||
|
flex: 0,
|
||||||
|
backgroundColor: '#fff',
|
||||||
|
borderRadius: 5,
|
||||||
|
padding: 15,
|
||||||
|
paddingHorizontal: 20,
|
||||||
|
alignSelf: 'center',
|
||||||
|
margin: 20
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user