Skip to content

Instantly share code, notes, and snippets.

@cyb3rsalih
Last active October 2, 2018 21:06
Show Gist options
  • Save cyb3rsalih/ee4834923bde4ab68f335c272437417b to your computer and use it in GitHub Desktop.
Save cyb3rsalih/ee4834923bde4ab68f335c272437417b to your computer and use it in GitHub Desktop.
Login Page Text Inputs w/ React Native
<View>
<TextInput
value={this.state.username}
onChangeText={(u) => this.setState({username:u})}
placeholder={'Kullanıcı Adı'}
style={styles.textInput}
blurOnSubmit={false}
returnKeyType = {"next"}
onSubmitEditing={() => { this.secondTextInput.focus(); }}
/>
<TextInput
value={this.state.password}
onChangeText={(p) => this.setState({password:p})}
secureTextEntry={true}
placeholder={'Parola'}
style={styles.textInput}
blurOnSubmit={false}
ref={(input) => { this.secondTextInput = input; }}
/>
</View>
const styles = StyleSheet.create({
textInput:{
height:Dimensions.get('window').height * 0.07,
width:Dimensions.get('window').width * 0.8,
backgroundColor:'white',
borderRadius:20,
margin:10,
paddingLeft:10,
borderColor:'grey',
borderWidth:1,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment