aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Shillingford <jgs272@cornell.edu>2020-06-26 13:25:06 -0400
committerJustin Shillingford <jgs272@cornell.edu>2020-06-29 14:25:38 -0400
commit607b3cc19468d8b8e00ee7263adb75f8f152467e (patch)
tree07ceb6f7b16d036e17a759a70793b3ef76d8f679
parentea9dd5a851bddf91f265404525239d3e52ecb5aa (diff)
Added styling and security to keyboards
-rw-r--r--App.tsx18
1 files changed, 16 insertions, 2 deletions
diff --git a/App.tsx b/App.tsx
index 2ed7d496..037a1390 100644
--- a/App.tsx
+++ b/App.tsx
@@ -8,7 +8,7 @@
* @format
*/
-import React from 'react';
+import React, { useRef } from 'react';
import {
SafeAreaView,
StyleSheet,
@@ -36,6 +36,9 @@ import LinearGradient from 'react-native-linear-gradient';
declare const global: {HermesInternal: null | {}};
const App = () => {
+
+ const passwordInput = useRef();
+
return (
<>
<View style={styles.container}>
@@ -48,11 +51,22 @@ const App = () => {
style={styles.credentials}
placeholder="Username"
placeholderTextColor='#FFFFFF'
+ returnKeyType='next'
+ onSubmitEditing={() => {passwordInput.current.focus()}}
+ blurOnSubmit={false}
+ autoCompleteType='username'
+ textContentType='username'
+ keyboardType='ascii-capable'
/>
<TextInput
+ ref={passwordInput}
style={styles.credentials}
placeholder="Password"
placeholderTextColor='#FFFFFF'
+ secureTextEntry={true}
+ autoCompleteType='password'
+ textContentType='password'
+ returnKeyType='go'
/>
<View style={styles.forgotPassword}>
<Button
@@ -119,7 +133,7 @@ const styles = StyleSheet.create({
fontSize: 15
},
getStarted: {
- color: '#FFFFFF'
+ color: '#FFFFFF',
},
newUser: {
top: 230,