Skip to content

Instantly share code, notes, and snippets.

@andyyou
Created November 26, 2015 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyyou/fe7bcff8edd5eef0bb5f to your computer and use it in GitHub Desktop.
Save andyyou/fe7bcff8edd5eef0bb5f to your computer and use it in GitHub Desktop.
react-native-issue-sample.js
'use strict';
var React = require('react-native');
var {
StyleSheet,
View,
Text,
ScrollView,
} = React;
var Sandbox = React.createClass({
render: function () {
return (
<ScrollView style={styles.container}>
<View style={styles.father}>
<Text>Hello sandbox</Text>
<Text>Hello sandbox</Text>
<Text>Hello sandbox</Text>
<Text>Hello sandbox</Text>
<Text>Hello sandbox</Text>
<Text>Hello sandbox</Text>
<View style={styles.son}>
<View style={styles.grandson}><Text>A</Text></View>
<View style={styles.grandson}><Text>B</Text></View>
<View style={styles.grandson}><Text>C</Text></View>
<View style={styles.grandson}><Text>D</Text></View>
<View style={styles.grandson}><Text>E</Text></View>
<View style={styles.grandson}><Text>F</Text></View>
</View>
</View>
</ScrollView>
);
},
});
var styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 20,
},
father: {
backgroundColor: 'rgba(255, 255, 0, .2)',
padding: 20,
},
son: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'rgba(0, 255, 255, .6)',
flexDirection: 'row',
justifyContent: 'center',
},
grandson: {
flex: 1,
height: 50,
backgroundColor: 'rgba(0, 0, 0, .5)',
},
});
module.exports = Sandbox;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment