Skip to content

Instantly share code, notes, and snippets.

@jarvisluong
Last active June 27, 2021 08:24
Show Gist options
  • Save jarvisluong/5d5f68b2dd61337613e2d3a2b911a6ac to your computer and use it in GitHub Desktop.
Save jarvisluong/5d5f68b2dd61337613e2d3a2b911a6ac to your computer and use it in GitHub Desktop.
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'
}
}
@chzappsinc
Copy link

Man add full view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment