/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
Image
} from 'react-native'; class machaoProject extends Component {
render() {
return (
<View style={styles.container}>
<View style={ styles.topBgView}> <View style={styles.unitView} >
<Image
source={require('./Images/001.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
美食
</Text>
</View> <View style={styles.unitView} >
<Image
source={require('./Images/002.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
电影
</Text>
</View> <View style={styles.unitView} >
<Image
source={require('./Images/003.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
酒店
</Text>
</View> <View style={styles.unitView} >
<Image
source={require('./Images/004.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
KTV
</Text>
</View>
</View> <View style = {styles.topBgView}> <View style={styles.unitView} >
<Image
source={require('./Images/005.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
外卖
</Text>
</View> <View style={styles.unitView} >
<Image
source={require('./Images/006.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
优惠买单
</Text>
</View> <View style={styles.unitView} >
<Image
source={require('./Images/007.png')}
style={styles.imageStyle}
/>
<Text style = {styles.textStyle}>
你说呢
</Text>
</View> </View> </View>
);
}
} const styles = StyleSheet.create({
container: {
marginLeft: 5,
marginTop: 20,
marginRight: 5,
},
topBgView: {
flexDirection: 'row',
backgroundColor: 'red',
marginTop: 10,
},
unitView: {
width: 70 ,
},
imageStyle: {
alignSelf: 'center',
width: 45,
height: 45,
},
textStyle: {
marginTop: 0,
textAlign: 'center',
fontSize: 15,
color: '#555555'
}
}); AppRegistry.registerComponent('machaoProject', () => machaoProject);

react-native 学习之Image篇的更多相关文章

  1. React Native 学习-01

    React Native 学习 (学习版本 0.39) 一.环境配置 二.IDE选择 webstorm 1.webstorm配置 ①.首先是可以选择使用汉化包汉化.eu68 ②.安装插件和外部库. 由 ...

  2. react native 学习一(环境搭配和常见错误的解决)

    react native 学习一(环境搭配) 首页,按照http://reactnative.cn/docs/0.30/getting-started.html#content上的介绍,下载安装pyt ...

  3. React Native 学习资料

    React Native 学习资料 学习资料 网址 React Native中文网 https://reactnative.cn/

  4. React Native 学习(三)之 FlexBox 布局

    React Native 学习(三)之 FlexBox 布局

  5. React Native 学习笔记--进阶(二)--动画

    React Native 进阶(二)–动画 动画 流畅.有意义的动画对于移动应用用户体验来说是非常必要的.我们可以联合使用两个互补的系统:用于全局的布局动画LayoutAnimation,和用于创建更 ...

  6. react native 学习资料整理

    入门教程 深入浅出 React Native:使用 JavaScript 构建原生应用 http://www.appcoda.com/react-native-introduction/  中文版 h ...

  7. iOS 写给iOS开发者的React Native学习路线(转)

    我是一名iOS开发者,断断续续一年前开始接触React Native,最近由于工作需要,专职学习React Native也有一个多月了.网络上知识资源非常的多,但能让人豁然开朗.迅速学习的还是少数,我 ...

  8. React Native学习方法论

    这是我技术公众号的第一篇文章,也是React Native系列文章的第一篇,对我的文章感兴趣的可以加我微信16230091进行关注. 本文表面上讲React Native(以下简称RN),实际上对于学 ...

  9. react native学习资料

    一:基础学习: react-native中文文档(react native中文网,人工翻译,官网完全同步)http://react-native.cn/docs/getting-started.htm ...

  10. 写给iOS开发者的React Native学习路线(转)

    我是一名iOS开发者,断断续续一年前开始接触React Native,最近由于工作需要,专职学习React Native也有一个多月了.网络上知识资源非常的多,但能让人豁然开朗.迅速学习的还是少数,我 ...

随机推荐

  1. iOS开发之记录用户登录状态

    iOS开发之记录用户登录状态 我们知道:CoreData的配置和使用步骤还是挺复杂的.但熟悉CoreData的使用流程后,CoreData还是蛮好用的.今天要说的是如何记录我们用户的登陆状态.例如微信 ...

  2. 印象笔记 剪藏(Evernote WebClipper) bug 记录

    问题记录: Chrome版的 webclipper不知为何新装的时候切换到中国版印象笔记登陆的时候闪退,然后之后就无法进入中国区的登录页面:international版确认可以登录. cookies是 ...

  3. js中的navigator对象

    Navigator 对象包含有关浏览器的信息.所有浏览器都支持该对象 在控制台中输出相关信息的代码 <script> console.log(navigator); </script ...

  4. ant的安装及项目的发布

    1.安装ant1) 直接解压apache-ant-1.9.7-bin 2) 在环境变量中配置,ant_home的环境变量在 3) 在命令提示符中测试是否安装成功. 2 项目首次打包1) 写好打包的配置 ...

  5. Linux 安装PHP PECL 百分百成功

    1.  下载 需要安装的组件 http://pecl.php.net/packages.php 2.  解压  tar zxf 你的扩展包路径 3.  进入你解压的扩展包路径后 访问 /usr/bin ...

  6. sql字符串分组

    create function f_myWord(@s varchar(50)) returns varchar(50) as begin declare @i int set @i=1 while ...

  7. Sort简单排序

    List<T> 类型排序: public List<ProductionMaterialModel> OrderBybom(List<ProductionMaterial ...

  8. SQL Server复制出错文章集锦

    SQL Server复制出错文章集锦 为了方便大家对数据库复制过程中出错的时候更好地解决问题 本人收集了SQL Server相关复制出错解决的文章   The process could not ex ...

  9. 你必须知道的指针基础-1.预备篇:搭建GCC开发环境

    一.关于GCC编译器 GCC(GNU Compiler Collection)是一套功能强大.性能优越的编程语言编译器,它是GNU计划的代表作品之一.GCC是Linux平台下最常用的编译器,GCC原名 ...

  10. Javascript分号,加还是不加?

    关于这个问题,网上已经有很多人讨论过了,我先说说自己对这个问题的回答:加!(但非必须) 有些人写代码,懒得加分号,除非是迫不得已才勉强放一个分号上去.如果你可以保证你写的代码不出现任何 bug,那当然 ...