React native code

How can input text in TextInput four digit Id and automatically move to next page?
Please help me

1 Like

Please reply me 

Please don’t bump topics. If people aren’t responding to your topic, you could try to give more detailed information to help people have the information they need to help you. In the past, the following things have been effective in other cases:

  1. List in as much detail as you can, exactly what you’ve already tried
  2. Describe, in detail, what happened when you tried each of the above things
  3. Describe, in detail, what you expect to happen when you tried each of the above things
  4. Share a link to your code, if it is available publicly
  5. Include logs, if appropriate, by posting them as a Gist

I hope that helps!

1 Like

import React, { Component } from ‘react’;
import {
StyleSheet,
Text,
TextInput,
View,
StatusBar
} from ‘react-native’;

import { Actions, ActionConst,Button } from ‘react-native-router-flux’;

export default class First extends Component<Props> {

render() {
return (
<View style={styles.textId}>
<StatusBar
backgroundColor="#000000"
barStyle=“light-content”
/>

<View style={{ height: 75, backgroundColor: ‘#c0c1c4’}} />

<Text style={styles.welcome}>
Hello Students
</Text>

<TextInput style={styles.inputBox}
placeholder=" Enter Your four digit Id"
placeholderTextColor="#9c9fa3"
maxLength = {4}
keyboardType=“numeric”
underlineColorAndroid={‘transparent’}

/>

<View style={{ height: 75, backgroundColor: ‘#c0c1c4’}} />

</View>

);
}
}

const styles = StyleSheet.create({
textId: {
flex: 1,
flexDirection: ‘column’,
justifyContent: ‘space-between’,
backgroundColor:’#ffffff
},
welcome: {
fontSize: 35,
textAlign: ‘center’,
color: ‘black’

},
inputBox:{
textAlign:‘center’,
fontSize: 25,
color:’#000000’,
alignItems:‘center’,
borderBottomColor:’#f209b0’,
borderBottomWidth:2,
marginLeft:20,
marginRight:20
}
});

 

 

"How do I automatically redirect to next page when I am entering the four digit ID into Text Input field"

 

Send me the code to react on it

1 Like

Please direct me how to get access to the code