react-native(리액트 네이티브) component - Image
import React, {Component} from 'react';
import {StyleSheet, Text, View, Dimensions,ImageBackground, Image,} from 'react-native';
const { height, width } = Dimensions.get("window");
type Props = {};
export default class App extends Component<Props> {
constructor(props) {
super(props)
this.state = {
animating: false,
}
}
render() {
return (
<View>
<ImageBackground
source = {require("./assets/tea.png")}
resizeMode = "cover"
style = {{width, height}}
style = {styles.centering}
>
<Image
source = {{uri: "https://wallpaper.wiki/wp-content/uploads/2017/04/wallpaper.wiki-Images-HD-Diamond-Pattern-PIC-WPB009691.jpg"}}
style = {{width:width, height: 50, marginBottom: 50}} />
<Image
source = {require("./assets/xxx.png")}
style = {{width:width/3, height: 70, marginTop: 20, marginBottom: 50}}
/>
<Text style = {{marginLeft: 30, marginBottom: 50, fontSize: 30, color: 'blue'}}>
Country_selected : {this.state.country || 'dfdfd'}
</Text>
<Image
source = {require("./assets/xxx.png")}
style = {{width:width/3, height: 150}}
/>
</ImageBackground>
</View>
);
}
}
const styles = StyleSheet.create({
centering: {
alignItems: 'center',
justifyContent: 'center',
},
});
'프로그래밍(Programming) > 리액트 네이티브(React Native)' 카테고리의 다른 글
react-native(리액트 네이티브) component - ListView_Grid (0) | 2019.01.06 |
---|---|
react-native(리액트 네이티브) component - ListView (0) | 2019.01.06 |
react-native(리액트 네이티브) component - FlatList_MultiColumn (0) | 2019.01.06 |
react-native(리액트 네이티브) component - FlatList (0) | 2019.01.06 |
react-native(리액트 네이티브) component - CheckBox (0) | 2019.01.06 |