Skip to content

Commit

Permalink
[#1] feat: fix pverlapping components when keyboard raised
Browse files Browse the repository at this point in the history
  • Loading branch information
hee-suh committed Mar 25, 2022
1 parent 7e138f9 commit 7aa2e44
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions react-native/screens/JoinScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export default function JoinScreen({ navigation }: Navigation) {
};

return (
<KeyboardAvoidingView style={styles.container} behavior={Platform.OS === "ios" ? "padding" : "height"}>
<View style={styles.topView}>
<KeyboardAvoidingView style={styles.container} behavior={Platform.OS === "ios" ? "padding" : "height"} enabled keyboardVerticalOffset={100}>
<ScrollView>
<VStack space={4} style={{ flex: 1 }}>
<FormControl isRequired style={{ flex: 1.2 }}>
<FormControl.Label>Profile Image</FormControl.Label>
Expand Down Expand Up @@ -164,12 +164,10 @@ export default function JoinScreen({ navigation }: Navigation) {
</ScrollView>
</FormControl>
</VStack>
</View>
<View style={styles.bottomView}>
<Button size="lg" onPress={onJoinPressed}>
<Button size="lg" my={2} onPress={onJoinPressed}>
Sign up
</Button>
</View>
</ScrollView>
</KeyboardAvoidingView>
);
}
Expand All @@ -181,12 +179,7 @@ const styles = StyleSheet.create({
backgroundColor: theme.colors.background,
flex: 1,
flexDirection: 'column',
},
topView: {
flex: 5,
},
bottomView: {
flex: 1
justifyContent: 'center'
},
profileImage: {
width: 52,
Expand Down

0 comments on commit 7aa2e44

Please sign in to comment.