import React, { Component } from 'react'; import { Platform, StyleSheet, Image, ListView, Text, ScrollView, TextInput, TouchableHighlight, View } from 'react-native'; import RunInfo from './components/run-info'; import RunInfoNumeric from './components/run-info-num'; import MapView from 'react-native-maps'; const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu', }); {/**/} {/**/} type Props = {}; export default class App extends Component { constructor(props) { super(props); let ds = new ListView.DataSource({rowHasChanged: (a, b) => a !== b}); this.state = {dataSource: ds.cloneWithRows([ 'john', 'joel', 'miki', 'iu lol', 'yeeet', 'john', 'joel', 'miki', 'iu lol', 'yeeet', 'john', 'joel', 'miki', 'iu lol', 'yeeet', 'john', 'joel', 'miki', 'iu lol', 'yeeet', 'john', 'joel', 'miki', 'iu lol', 'yeeet', ])}; setInterval(() => { // this.distanceInfo.setState({value: Math.random() * 100}); // this.speedInfo.setState({value: Math.random() * 15}); // this.directionInfo.setState({value: this.directionInfo.state === 'N' ? 'NW' : 'N'}); }, 1000); } render() { return ( } renderRow={(row) => ( {row} )} /> // // this.setState({text})} // onBlur={() => this.setState({ text: this.state.text.toUpperCase() })} // /> // // this.setState({confirmedText: this.state.text})} // onLongPress={() => this.setState({confirmedText: this.state.text.toLowerCase()})} // > // Press Me // // // // {this.state.confirmedText} // // // // // this.distanceInfo = info} // /> // this.speedInfo = info} // /> // this.directionInfo = info} // /> // // ); } } const styles = StyleSheet.create({ infoWrapper: { position: 'absolute', left: 0, bottom: 0, right: 0, flexDirection: 'row', flex: 1 }, map: { ...StyleSheet.absoluteFillObject }, container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, welcome: { fontSize: 20, textAlign: 'center', margin: 10, }, instructions: { textAlign: 'center', color: '#333333', marginBottom: 5, }, });