Created
May 30, 2017 16:29
-
-
Save padupuy/1ddaf5070fb650e7d6eae02d3b0af37d to your computer and use it in GitHub Desktop.
Android zIndex bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import { | |
StyleSheet, | |
View, | |
Text, | |
} from 'react-native'; | |
export default class DummyScreen extends Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<View style={styles.up}/> | |
<View style={styles.down}> | |
<View style={styles.middle}> | |
<Text style={styles.title}>Text</Text> | |
</View> | |
</View> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
backgroundColor: 'black', | |
flex: 1, | |
}, | |
up: { | |
justifyContent: 'center', | |
alignItems: 'center', | |
paddingBottom: 60, | |
backgroundColor: 'black', | |
marginHorizontal: 20, | |
position: 'relative', | |
flex: 1, | |
}, | |
down: { | |
backgroundColor: '#F0F0F0', | |
flex: 1, | |
}, | |
middle: { | |
backgroundColor: 'white', | |
top: -40, | |
marginHorizontal: 20, | |
}, | |
title: { | |
fontSize: 36, | |
textAlign: 'center', | |
marginTop: 20, | |
marginBottom: 20, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment