Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TextInput
- textContentType="password"
- autoCapitalize="none"
- secureTextEntry={true}
- value={this.state.password}
- underlineColorAndroid="transparent"
- />
- import React, {Component} from 'react';
- import {Modal, Text, TouchableHighlight, View, Alert} from
- 'react-native';
- class ModalExample extends Component {
- state = {
- modalVisible: false,
- };
- setModalVisible(visible) {
- this.setState({modalVisible: visible});
- }
- render() {
- return (
- <View style={{marginTop: 22}}>
- <Modal
- animationType="slide"
- transparent={false}
- visible={this.state.modalVisible}
- onRequestClose={() => {
- Alert.alert('Modal has been closed.');
- }}>
- <View style={{marginTop: 22}}>
- <View>
- <TextInput
- textContentType="password"
- autoCapitalize="none"
- secureTextEntry={true}
- value={this.state.password}
- underlineColorAndroid="transparent"
- />
- </View>
- </View>
- </Modal>
- <TouchableHighlight
- onPress={() => {
- this.setModalVisible(true);
- }}>
- <Text>Show Modal</Text>
- </TouchableHighlight>
- </View>
- ); }}
Add Comment
Please, Sign In to add comment