RN布局(登陆界面Demo)
来源:互联网 发布:unknown网络 编辑:程序博客网 时间:2024/06/10 13:53
/** * Created by targetcloud on 2016/12/17. */import React, { Component } from 'react';import { AppRegistry, StyleSheet, Text, View, Image, TextInput} from 'react-native';var Dimensions = require('Dimensions');var {width,height} = Dimensions.get('window');class loginView extends Component { render() { return ( <View style={styles.container}> <Image source={require('./img/targetcloud.png')} style={styles.tgIconStyle}/> <TextInput placeholder={'请输入用户名'} style={styles.tgTextInputStyle} /> <TextInput placeholder={'请输入密码'} password={true} style={styles.tgTextInputStyle} /> <View style={styles.tgLoginBtnStyle}> <Text style={{color:'white'}}>登录</Text> </View> <View style={styles.tgSettingStyle}> <Text>无法登录</Text> <Text>新用户</Text> </View> <View style={styles.tgOtherLoginStyle}> <Text>其他登录方式: </Text> <Image source={require('./img/icon2.png')} style={styles.tgOtherImageStyle} /> <Image source={require('./img/icon3.png')} style={styles.tgOtherImageStyle} /> <Image source={require('./img/icon4.png')} style={styles.tgOtherImageStyle} /> </View> </View> ); }}const styles = StyleSheet.create({ container: { flex: 1, alignItems:'center' }, tgIconStyle:{ width:80, height:80, marginTop:60, marginBottom:30, borderRadius:40, borderWidth:1, borderColor:'grey' }, tgTextInputStyle:{ width:width*0.8, height:38, borderColor: 'lightgrey', borderWidth: 1, marginBottom:8, borderRadius:4, textAlign:'left', alignSelf:'center' }, tgLoginBtnStyle:{ height:38, width:width*0.8, backgroundColor:'#00BB00', marginTop:8, marginBottom:20, justifyContent:'center', alignItems:'center', borderRadius:4 }, tgSettingStyle:{ flexDirection:'row', width:width*0.8, justifyContent:'space-between' }, tgOtherLoginStyle:{ flexDirection:'row', alignItems:'center', position:'absolute', bottom:width*0.1, left:width*0.1 }, tgOtherImageStyle:{ width:40, height:40, borderRadius:20, marginLeft:8 }});module.exports = loginView;
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */import React, { Component } from 'react';import { AppRegistry, StyleSheet, Text, View, Image, TextInput} from 'react-native';var LoginView = require('./loginView');export default class ARNDemo extends Component { render() { return ( <LoginView /> ); }}AppRegistry.registerComponent('ARNDemo', () => ARNDemo);
0 0
- RN布局(登陆界面Demo)
- RN-Demo
- 登陆界面和进入文本界面Demo
- RelativeLayout布局制作登陆界面
- 《React-Native系列》11、 图解RN布局之FlexBox,三分钟上手写RN界面
- RN实战项目登录界面(四)
- RN的listview Demo
- RN入门练习Demo
- RN布局(一)——flexbox布局
- android登陆界面的UI布局
- Qt实战开发-CSDN登陆界面布局
- RN-flexbox(弹性布局)
- Android漂亮好看的登陆,注册界面!(有可运行Demo)
- RN(react native)入坑指南-04,布局容器
- RN布局(二)——伸缩容器的属性
- RN布局(三)——伸缩项目的属性
- RN 多行换行布局
- 使用线性布局实现简单登陆界面的实例
- js对象中封装方法
- SVM入门(九)松弛变量(续)
- 设计模式-行为性设计模式:策略模式 Strategy
- 技能包!Linux 下清空或删除大文件内容的 5 种方法
- c++::实现一个日期类
- RN布局(登陆界面Demo)
- java synchronized详解
- 响应式设计之媒体查询
- SVM入门(十)将SVM用于多类分类
- 【TZCOO】教你做一个高逼格的演讲人
- js object ---》json
- Leetcode Matchsticks to Square 473
- 把Tomcat设置为Windows服务
- 集合框架_并发修改异常的产生原因及解决方案