Last active
June 27, 2021 08:24
-
-
Save jarvisluong/5d5f68b2dd61337613e2d3a2b911a6ac to your computer and use it in GitHub Desktop.
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
content = [1,2,3,4,5,6,7,8,9,10] | |
<SafeAreaView style={styles.container}> | |
<KeyboardAvoidingView style={styles.keyboardAvoidContainer} behavior="padding"> | |
<ScrollView style={{flex: 1}}> | |
{content.map(num => ( | |
<View style={{height: 80, margin: 10, borderWidth: 1, justifyContent: 'center', alignItems: 'center'}} key={num}> | |
<Text>{num}</Text> | |
</View> | |
)} | |
</ScrollView> | |
<TextInput style={{height: 40, width: '100%', backgroundColor: '#fff', paddingLeft: 10, justifySelf: 'flex-end', color: '#fff'}} placeholder={'Enter text here'}/> | |
</KeyboardAvoidingView> | |
</SafeAreaView> | |
const styles = { | |
container: { | |
flex: 1 | |
}, | |
keyboardAvoidContainer: { | |
flex: 1, | |
backgroundColor: 'orange' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Man add full view