Skip to content

Commit

Permalink
added keyboard scroll view
Browse files Browse the repository at this point in the history
  • Loading branch information
celineehusen committed Apr 18, 2024
1 parent d89de6a commit 0973052
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export {

export const unstable_settings = {
// Ensure that reloading on `/modal` keeps a back button present.
initialRouteName: "welcome",
initialRouteName: "(tabs)",
};

// Prevent the splash screen from auto-hiding before asset loading is complete.
Expand Down Expand Up @@ -58,11 +58,11 @@ function RootLayoutNav() {
<Stack.Screen name="welcome" options={{ headerShown: false }} />
<Stack.Screen
name="signIn"
options={{ headerShown: false, gestureEnabled: false }}
options={{ headerShown: false }}
/>
<Stack.Screen
name="signUp"
options={{ headerShown: false, gestureEnabled: false }}
options={{ headerShown: false }}
/>
<Stack.Screen name="onboarding" options={{ headerShown: false }} />
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
Expand Down
5 changes: 3 additions & 2 deletions app/signIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { SB_COLOR_SCHEME } from "@/constants";
import { Button, TextInput } from "@swift-byte/switftbytecomponents";
import { Link, router } from "expo-router";
import Logo from "../assets/images/logo-green.svg";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";

export default function signIn() {
const [email, setEmail] = useState<string>("");
const [password, setPassword] = useState<string>("");
return (
<SafeAreaView style={{ height: "100%", backgroundColor: "white" }}>
<ScrollView style={styles.scrollView}>
<KeyboardAwareScrollView style={styles.scrollView}>
<View style={styles.container}>
<Logo width={150} height={40} />
<Text
Expand Down Expand Up @@ -113,7 +114,7 @@ export default function signIn() {
</Text>
</View>
</View>
</ScrollView>
</KeyboardAwareScrollView>
</SafeAreaView>
);
}
Expand Down
5 changes: 3 additions & 2 deletions app/signUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SB_COLOR_SCHEME } from "@/constants";
import { Button, TextInput } from "@swift-byte/switftbytecomponents";
import { Link, router } from "expo-router";
import Logo from "../assets/images/logo-green.svg";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";

export default function signUp() {
const [name, setName] = useState<string>("");
Expand All @@ -13,7 +14,7 @@ export default function signUp() {

return (
<SafeAreaView style={{ height: "100%", backgroundColor: "white" }}>
<ScrollView style={styles.scrollView}>
<KeyboardAwareScrollView style={styles.scrollView}>
<View style={styles.container}>
<Logo width={150} height={40} />
<Text
Expand Down Expand Up @@ -185,7 +186,7 @@ export default function signUp() {
</Text>
</View>
</View>
</ScrollView>
</KeyboardAwareScrollView>
</SafeAreaView>
);
}
Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.5",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-ratings": "^8.1.0",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
Expand Down

0 comments on commit 0973052

Please sign in to comment.