chore(lib) make the example less glitchy by fixing the width
This commit is contained in:
parent
9e9f290380
commit
e19ff9d680
|
@ -19,6 +19,7 @@ const {
|
|||
Text,
|
||||
View,
|
||||
TouchableOpacity,
|
||||
Dimensions
|
||||
} = ReactNative;
|
||||
import CameraRoll from '../../js/CameraRoll';
|
||||
import type {PhotoIdentifier, GroupTypes} from '../../js/CameraRoll';
|
||||
|
@ -57,6 +58,7 @@ export default class CameraRollExample extends React.Component<Props, State> {
|
|||
render() {
|
||||
return (
|
||||
<View>
|
||||
<View style={styles.header}>
|
||||
<Switch
|
||||
onValueChange={this._onSwitchChange}
|
||||
value={this.state.bigImages}
|
||||
|
@ -67,6 +69,7 @@ export default class CameraRollExample extends React.Component<Props, State> {
|
|||
onValueChange={this._onSliderChange}
|
||||
/>
|
||||
<Text>{'Group Type: ' + this.state.groupTypes}</Text>
|
||||
</View>
|
||||
<CameraRollView
|
||||
ref={ref => {
|
||||
this._cameraRollView = ref;
|
||||
|
@ -131,6 +134,11 @@ export default class CameraRollExample extends React.Component<Props, State> {
|
|||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
header: {
|
||||
marginTop: 44,
|
||||
padding: 20,
|
||||
width: Dimensions.get('window').width
|
||||
},
|
||||
row: {
|
||||
flexDirection: 'row',
|
||||
flex: 1,
|
||||
|
|
Loading…
Reference in New Issue