Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from "react";
- import { Platform, StyleSheet, Text, View, Image } from "react-native";
- export default class App extends Component {
- render() {
- return (
- <View style={styles.container}>
- <Text style={styles.headerText}>
- Show Image From HTTP URL In React Native.
- </Text>
- <Image
- style={{ width: "100%", height: 200, resizeMode: "stretch" }}
- source={{
- uri:
- "https://4.bp.blogspot.com/-krdeTqQLML8/Wyf2oV7eedI/AAAAAAAABpI/OZ759swV7L8wWtt2pwBXIgp6aPz33r01gCLcBGAs/s400/fist%2Bapp.jpg"
- }}
- />
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: "center",
- alignItems: "center",
- backgroundColor: "#F5FCFF"
- },
- headerText: {
- fontSize: 20,
- textAlign: "center",
- margin: 10,
- fontWeight: "bold"
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement