最近在做一个小练习项目,用户登陆后需要跳转到用户登录信息界面,加班半个小时终于将界面的布局搞定。接触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. ASP.NET 导出Excel文档

    System.IO.TextWriter writer = new System.IO.StreamWriter(Server.MapPath("/provprice.xls"), ...

  2. 使用do...while的方法输入一个月中所有的周日

    do{ var date = Number(prompt('请输入一个月的总天数')); var start = (prompt('请输入一个月的一号是周几')); for(var i=0;i< ...

  3. .C .h 和 .CCP的区别

    1.*.H:C语言规定使用一个变量或调用一个函数前必须声明,为了使用方便,经常把常用函数,例如Windows API的函数,MFC类写入头文件.h,这样每次需要引用时只要使用#include加入就可以 ...

  4. python调win32api调整屏幕分辨率

    需要频繁切换屏幕分辨率,想写个脚本来实现,需要切换时运行一下就好 在网上查到,需要用windows的api,ChangeDisplaySettings 实现代码如下 import win32api d ...

  5. HttpURLConnection详解

    HttpURLConnection详解 07. 五 / J2EE / 没有评论   HttpURLConnection类的作用是通过HTTP协议向服务器发送请求,并可以获取服务器发回的数据. Http ...

  6. BeanUtils包的学习

    BeanUtils支持八种基本数据类型(int double short char byte float boolean long)的反射,对于日期需要提前注册DateLocalConvert获取转换 ...

  7. sql helper

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.C ...

  8. iOS开发之OC篇-响应式编程Reactive Cocoa

    一.Reactive Cocoa 介绍 Reactive Cocoa 是 iOS 开发的一个 "重量级" 框架 高大上的概念:响应式编程 核心概念:信号 Signal 官方网站:h ...

  9. Linux下find与grep指令的相关用法

    find命令 find命令的一般形式 find命令的常用选项及实例 find与xargs grep命令 grep命令的一般形式 grep正则表达式元字符集(基本集) grep命令的常用选项及实例 1. ...

  10. Asp.net Web.Config - 配置元素customErrors

    Asp.net配置文件的配置方式,其实在MSDN里面是写得最清楚的了.可惜之前一直未曾了解到MSDN的强大. 先贴个地址:http://msdn.microsoft.com/zh-cn/library ...