Last active
October 2, 2018 21:06
-
-
Save cyb3rsalih/ee4834923bde4ab68f335c272437417b to your computer and use it in GitHub Desktop.
Login Page Text Inputs w/ React Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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