import React from 'react-native'; import GlobalStyles from '../../settings/styles'; const { StyleSheet, Text, View, TextInput, TouchableHighlight, ScrollView, BackAndroid } = React; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#F5FCFF', }, contentWrapper: { flex: 0.85, justifyContent: 'center', alignItems: 'center' }, input: { marginHorizontal: 10, height: 50, borderColor: 'gray', borderWidth: 1, textAlign: 'center' }, loginButton: { flex: 1, backgroundColor: GlobalStyles.get('CIRCLE_BLUE'), justifyContent: 'center', alignItems: 'center', }, loginButtonText: { fontSize: 16, color: 'white', }, buttonContainer: { flexDirection: 'row', height: 80, justifyContent: 'center', padding: 10 }, title: { fontSize: 25, margin: 13 } }); export default class Login extends React.Component { constructor() { super(); this.state = { }; this.validate = this.validate.bind(this); this.updateState = this.updateState.bind(this); } updateState(key, value) { let state = this.state; state[key] = value; this.setState(state); } validate() { } componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button } render() { return ( Login to continue this.updateState('password', password)} value={this.state.password} onSubmitEditing={this.validate} placeholder="Password" autoCorrect={true} /> Authenticate ); } };