/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React,{ Component } from 'react'; import { AppRegistry,StyleSheet,Image,Text,TouchableHighlight,View } from 'react-native'; export default class ViewProject extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> welcome to <Image source={require('./img/icon.png')} style={styles.imageInTextStyle}/> React Native </Text> </View> ); } } const styles = StyleSheet.create({ container: { flex:1,justifyContent: 'center',alignItems:'center' },welcome:{ fontSize:40,textAlign:'center',margin:5 },imageInTextStyle:{ width:100,height:100,resizeMode:'cover' } }); AppRegistry.registerComponent('ViewProject',() => ViewProject);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。