最近在做一个小练习项目,用户登陆后需要跳转到用户登录信息界面,加班半个小时终于将界面的布局搞定。接触Rect-Native也有一段时间了,以前没有做过ios,只做过android,就布局和开发效率上来说,react-native的给我的感觉是开发效率要大大高于android的。下面是具体的代码:

 import React from 'react-native'
import Icon from 'react-native-vector-icons/FontAwesome' let {
StyleSheet,
View,
Text,
Image
} = React var Temp = React.createClass({
render: function () {
return (
<View style={styles.container}>
<View style={styles.viewTop}>
<Text style={styles.txtTitle}>我</Text>
<Icon name='cog' style={styles.iconSetting} size={20}/>
</View>
<View style={styles.viewUser}>
<View style={styles.viewUserTop}>
<Image style={styles.imgUserTitle} source={require('../../assets/tx05.png')}/>
</View>
<Text style={styles.txtName}>微风zZ</Text>
<Text style={styles.txtGF}>关注 0 | 粉丝 0</Text>
<View style={styles.viewEdit}>
<Icon name='pencil-square-o' style={styles.iconEdit} size={15}/>
<Text style={styles.txtEdit}>编辑个人资料</Text>
</View>
</View>
<View style={styles.viewLove}>
<View style={styles.viewLoveTop}>
<Text style={styles.txtCommon}>我的喜爱 1</Text>
<Icon style={styles.iconCommon} name='angle-right' size={20}/>
</View>
<View style={styles.viewContent}>
<Image style={styles.imgLove} source={require('../../assets/recommend1.png')}/>
</View>
</View>
<View style={styles.viewCommon}>
<Text style={styles.txtCommon}>我的点评</Text>
<Icon style={styles.iconCommon} name='angle-right' size={20}/>
</View>
<View style={styles.viewCommon}>
<Text style={styles.txtCommon}>我参与的标签</Text>
<Icon style={styles.iconCommon} name='angle-right' size={20}/>
</View>
</View>
)
}
}) let styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F0F0F0'
},
viewTop: {
height: 60,
backgroundColor: '#F0F0F0',
alignItems: 'center',
borderBottomWidth: 1,
borderBottomColor: '#B7B7B7',
flexDirection: 'row'
},
txtTitle: {
flex: 1,
marginLeft: 10
},
iconSetting: {
marginRight: 10
},
viewUser: {
height: 250,
backgroundColor: '#F0F0F0'
},
viewUserTop: {
height: 100,
alignItems: 'center',
justifyContent: 'center'
},
imgUserTitle: {
height: 80,
width: 80,
borderRadius: 40
},
txtName: {
alignSelf: 'center'
},
txtGF: {
alignSelf: 'center',
marginTop: 40
},
viewEdit: {
width: 150,
marginTop: 20,
height: 30,
flexDirection: 'row',
alignSelf: 'center',
backgroundColor: '#E6E6E6',
justifyContent: 'center',
alignItems: 'center',
borderRadius: 10
},
txtEdit: {
marginLeft: 5,
alignSelf: 'center',
color: '#7997C7'
},
iconEdit: {
color: '#7997C7',
marginTop: 5
},
viewLove: {
height: 150,
borderBottomWidth: 10,
borderBottomColor: '#F0F0F0',
backgroundColor: 'ffffff'
},
viewLoveTop: {
height: 40,
flexDirection: 'row',
alignItems: 'center'
},
txtCommon: {
marginLeft: 15,
flex: 1
},
iconCommon: {
marginRight: 10
},
imgLove: {
height: 90,
width: 90,
margin: 10,
marginTop: 0
},
viewCommon: {
height: 50,
borderBottomWidth: 10,
borderBottomColor: '#F0F0F0',
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#ffffff'
}
}) module.exports = Temp

React-Native个人信息界面的更多相关文章

  1. 腾讯优测优分享 | 探索react native首屏渲染最佳实践

    腾讯优测是专业的移动云测试平台,旗下的优分享不定时提供大量移动研发及测试相关的干货~ 此文主要与以下内容相关,希望对大家有帮助. react native给了我们使用javascript开发原生app ...

  2. 探索react native首屏渲染最佳实践

    文 / 腾讯 龚麒 0.前言 react native给了我们使用javascript开发原生app的能力,在使用react native完成兴趣部落安卓端发现tab改造后,我们开始对由react n ...

  3. React Native移动开发实战-3-实现页面间的数据传递

    React Native使用props来实现页面间数据传递和通信.在React Native中,有两种方式可以存储和传递数据:props(属性)以及state(状态),其中: props通常是在父组件 ...

  4. 是时候了解React Native了

    文章首发于简书,欢迎关注 随着科技的发展,手机开发也在向好的方向不停的转变.IOS和Android两大手机操作横空出世,称霸江湖.我们每开发一个手机软件最少都需要开发这两个终端. 两大操作系统都在不断 ...

  5. React Native之获取通讯录信息并实现类通讯录列表(ios android)

    React Native之获取通讯录信息并实现类通讯录列表(ios android) 一,需求分析 1,获取通讯录信息,筛选出通讯录里有多少好友在使用某个应用. 2,获取通讯录信息,实现类通讯录,可拨 ...

  6. 【腾讯Bugly干货分享】React Native项目实战总结

    本文来自于腾讯bugly开发者社区,非经作者同意,请勿转载,原文地址:http://dev.qq.com/topic/577e16a7640ad7b4682c64a7 “8小时内拼工作,8小时外拼成长 ...

  7. React Native:使用 JavaScript 构建原生应用

    [转载] 本篇为联合翻译,译者:寸志,范洪春,kmokidd,姜天意 数月前,Facebook 对外宣布了正在开发的 React Native 框架,这个框架允许你使用 JavaScript 开发原生 ...

  8. React Native之 Navigator与NavigatorIOS使用

    前言 学习本系列内容需要具备一定 HTML 开发基础,没有基础的朋友可以先转至 HTML快速入门(一) 学习 本人接触 React Native 时间并不是特别长,所以对其中的内容和性质了解可能会有所 ...

  9. React Native之坑总结(持续更新)

    React Native之坑总结(持续更新) Genymotion安装与启动 之前我用的是蓝叠(BlueStack)模拟器,跑RN程序也遇到了一些问题,都通过搜索引擎解决了,不过没有记录. 但是Blu ...

  10. React Native APP结构探索

    APP结构探索 我在Github上找到了一个有登陆界面,能从网上获取新闻信息的开源APP,想来研究一下APP的结构. 附上原网址:我的第一个React Native App 具体来讲,就是研究一个复杂 ...

随机推荐

  1. 使用VS调试64位应用程序

    VS2012开始,就自带IIS Express,相比先前VS的Web调试器的弱智,和IIS的繁琐,Express简直是最佳方式啦. 本机环境是64位Win7 + 64位Oracle Client,调试 ...

  2. Canvas Api简介1

    canvas canvas 其实对于HTML来说很简单,只是一个标签元素而已,自己并没有行为,但却把一个绘图 API 展现给客户端 JavaScript 以使脚本能够把想绘制的东西都绘制到一块画布上, ...

  3. Code Complete阅读笔记(二)

    2015-03-06   328   Unusual Data Types    ——You can carry this technique to extremes,putting all the ...

  4. redhat换yum源

    根据redhat操作系统版本及位数,下载对应centos的版本及位数的这些包: yum-3.2.22-40.el5.centos.noarch.rpm yum-fastestmirror-1.1.16 ...

  5. js-String

    1.一个字符串可以使用单引号或双引号 2.查找 字符串使用 indexOf() 来定位字符串中某一个指定的字符首次出现的位置 如果没找到对应的字符函数返回-1 lastIndexOf() 方法在字符串 ...

  6. Firebug介绍及使用技巧

    一.介绍 Firebug是网页浏览器Firefox下的一款开发调试工具.安装firebug后在浏览器的插件工具栏中(上方)会有一个小甲虫的图标. F12打开和关闭Firebug窗口. 二.FireBu ...

  7. < meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />的作用

    < meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" /> 介绍:这 ...

  8. javascript之window对象

    window :window对象是BOM中所有对象的核心,除了是BOM中所有对象的父对象外,还包含一些窗口控制函数. 1.全局的window对象 JavaScript中的任何一个全局函数或变量都是wi ...

  9. SQL Server 2008空间数据应用系列五:数据表中使用空间数据类型

    原文:SQL Server 2008空间数据应用系列五:数据表中使用空间数据类型 友情提示,您阅读本篇博文的先决条件如下: 1.本文示例基于Microsoft SQL Server 2008 R2调测 ...

  10. Linux系统编程(9)—— 进程之进程控制函数exec系列函数

    在Linux中,并不存在exec()函数,exec指的是一组函数,一共有6个,分别是: #include <unistd.h> extern char **environ; int exe ...