One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
StyleSheet, |
import React, {Component} from 'react' | |
import { | |
Text, | |
StyleSheet, | |
View, | |
ListView, | |
TouchableHighlight, | |
Dimensions, | |
Image, | |
Animated, |
import React, {Component} from 'react' | |
import { Text, InputText, View, StyleSheet, Dimensions } from 'react-native' | |
const {width, height} = Dimensions.get('window') | |
export default class App extends Component { | |
render(){ | |
<View style={styles.container}> | |
<InputText | |
style={styles.inputText} |
export default class App extends Component { | |
constructor(){ | |
super() | |
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}) | |
this.state = { | |
dataSource: ds.cloneWithRows([]), | |
rawData: '' | |
} | |
} | |
<ListView | |
enableEmptySections={true} | |
renderRow={this.renderRow.bind(this)} | |
dataSource={this.state.dataSource} | |
/> |
renderRow(rowData){ | |
return ( | |
<TouchableHighlight style={styles.containerCell}> | |
<View> | |
<View style={styles.footerContainer}> | |
<View style={styles.footerTextContainer}> | |
<Text style={styles.text}>{rowData.name}</Text> | |
<Text style={[styles.text, styles.textTitle]}>{rowData.number}</Text> | |
<Text style={[styles.text, styles.textBy]}>By {rowData.airdate}</Text> | |
</View> |
filterSearch(text){ | |
this.setState({text}) | |
let newData = this.dataFilter(text, this.state.rawData); | |
this.setState({ | |
dataSource: this.state.dataSource.cloneWithRows(newData), | |
isLoaded: true, | |
empty: false | |
}) | |
} |
<TextInput | |
style={styles.textInput} | |
onChangeText={(text) => this.filterSearch(text)} | |
value={this.state.text} | |
/> |