Posts

Showing posts with the label TouchableOpacity

React Native - TextInput, Keyboard, TouchableOpacity, Button, and Alert - Example

Image
In this article, we will discuss how to create a simple input form + a button press + Alert by utilizing the React Native framework and Android Studio. React Native Local Environment Setup - click here We are going to create a mobile app like below, Terminologies : TextInput is the underlying component to input text. It has diverse props that configure the different features, such as onChangeText which takes a function and call it whenever the text is transmuted. The onSubmitEditing prop takes a function, which is called when the text is submitted. <ScrollView> <View style = { styles.inputContainer } > <TextInput style = { styles.textInput } placeholder = "Email" maxLength = { 20 } onBlur = { Keyboard.dismiss } value = {this .state.name } onChangeText = {this .handleNameChange } /> </View> </ScrollView> TouchableO