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

    1.The import org.apache.http.client; tip: cannot be resolved; resolve: Find library in your sdk and ...

  2. JavaScript ----------------- 原型式继承

    思想:借助原型可以基于已有的对象创建新对象,同时还不必因此创建自定义类型.为了达到这个目的,看看下面的实现方式 function object(o){ function F(){ } F.protot ...

  3. 多个Activity和Intent(转)

    根据www.mars-droid.com:Andriod开发视频教学,先跳过书本<Beginning Android 2>的几个章,我是这两个资源一起看,需要进行一下同步.先初步了解一下应 ...

  4. .c_str()/atoi()/

    1. c_str是把string类型强制转换为const string 2. atpi(): Convert string to integer --Parses the C-string str i ...

  5. ExtJS 饼状图报表

    简单的ExtJS饼状图报表. 先上源码,咱再慢慢解析: Ext.onReady(function(){ var store = Ext.create('Ext.data.JsonStore', { f ...

  6. Citrix 服务器虚拟化之十二 Xenserver灾难恢复

    Citrix 服务器虚拟化之十二 Xenserver灾难恢复 (环境有限实验无法测试,配置步骤摘取自官方文档) XenServer 灾难恢复的工作原理在存储库(SR)上还原从主(生产)环境复制到备份环 ...

  7. a 标签

    a标签成为块元素后,宽度会百分百撑开,但高度不会,需要加高度.

  8. 网关协议学习:CGI、FastCGI、WSGI、uWSGI

    一直对这四者的概念和区别很模糊,现在就特意梳理一下它们的关系与区别. CGI CGI即通用网关接口(Common Gateway Interface),是外部应用程序(CGI程序)与Web服务器之间的 ...

  9. mysql死锁——mysql之四

    1.MySQL常用存储引擎的锁机制 MyISAM和MEMORY采用表级锁(table-level locking) BDB采用页面锁(page-level locking)或表级锁,默认为页面锁 In ...

  10. order by 中 使用decode

    表内容如下: 实现以name字段中的ABCDE的顺序排序,以及按照money字段从小到大排序. select name,money from t2 ,,,,) , money