-
-
Save alien3d/ade9db606c76cf8f082e4436204bf325 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { Component } from 'react'; | |
import { | |
Platform, | |
StyleSheet, | |
Text, | |
View, | |
Image | |
} from 'react-native'; | |
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', | |
}); | |
export default class App extends Component<{}> { | |
render() { | |
let j ="http://192.168.0.154"; | |
let testImage =j+"/ratchet/images/upload/79/125/1513594186.jpg"; | |
return ( | |
<View style={styles.container}> | |
<Text style={styles.welcome}> | |
Test Image | |
</Text> | |
<Image source={{ uri:'http://192.168.0.154/ratchet/images/upload/79/125/1513594186.jpg' }} style={{ height:100,width:100 }}/> | |
<Text>Test Sample with load varible</Text> | |
<Image source={{ uri:testImage }} style={{ height:100,width:100 }}/> | |
</View> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: '#F5FCFF', | |
}, | |
welcome: { | |
fontSize: 20, | |
textAlign: 'center', | |
margin: 10, | |
}, | |
instructions: { | |
textAlign: 'center', | |
color: '#333333', | |
marginBottom: 5, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment