最近在做一个小练习项目,用户登陆后需要跳转到用户登录信息界面,加班半个小时终于将界面的布局搞定。接触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. EffectiveC#15--使用using和try/finally来做资源清理

    1.任何时候你在使用一个有Dispose()方法的类型时,你就有责任来调用Dispose()方法来释放资源. 最好的方法来保证Dispose()被调用的结构是使用using语句或者try/finall ...

  2. EffectiveC#1--尽可能的使用属性(property),而不是数据成员(field)

    1.属性可以进行数据绑定 2.可以做数据安全校验.在对数据检测时,如果发现数据不满足条件,最好以抛出异常的形式来解决 如下代码不可取 public string Name { get { if(thi ...

  3. System.Speech.Synthesis 添加暂停、继续功能

    为了方便调用暂停.继续的方法.要将speech的功能写成一个类.直接附上代码: using System; using System.Collections.Generic; using System ...

  4. zeromq源码分析笔记之准备(0)

    zeromq这个库主要用于进程通信,包括本地进程.网络通信,涉及到一些基础知识,主要包括管道通信,socket编程的内容,反应器模式(使用IO多路复用实现),无锁队列这几块比较重要的部分,下面的几个链 ...

  5. jQuery源码学习:使用隐藏的new来创建对象

    在JQuery源码中发现,JQuery定义一个类,但不用new关键字去创建该类对象,而使用方法调用()方式去创建该对象. 很多时候我们是这样写类,然后使用new创建对象的: function Pers ...

  6. php过滤iphone的emoji表情

    public static function removeEmoji($text) { $clean_text = ""; // Match Emoticons $regexEmo ...

  7. shell脚本练习

    写一个脚本:1.设定变量FILE的值为/etc/passwd2.依次向/etc/passwd中的每个用户问好,并显示对方的shell,形如: Hello, root, your shell: /bin ...

  8. 在linux中配置tomcat

    Linux下Tomcat的安装配置 一.下载安装对应的jdk,并配置Java环境. 官网下载地址: http://www.oracle.com/technetwork/java/javase/down ...

  9. 利用raspberry pi搭建typecho笔记(三) typecho nginx sqlite FAQ

    前言 这是一个汇总文,用来总结我在整个配置过程中遇到的各种问题.因为我在解决这些问题的过程中发现,typecho被部署在这种需要完全自己配置的平台上的情况是比较少的,相关的资料也比较少,所以我的解决过 ...

  10. linux mysql 优化

    第一 在 /etc/my.cnf 中加入 skip-name-resolve ,重启mysql,这样就能禁用DNS解析,连接速度会快很多.不过,这样的话就不能在MySQL的授权表中使用主机名了而只能用 ...