/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry,//注册 StyleSheet,//样式 Text,//文本 View,//页面 ,视图组件 Image } from 'react-native'; export default class zuojinminrea extends Component { //初始化方法 返回组件 render() { return ( <View style={styles.container}> <Text style={ { backgroundColor:'red',height:30,width:100}}>text111</Text> <Text style={ { backgroundColor:'orange',height:40,width:100,alignSelf:'flex-start'}}>text222</Text> <Text style={ { backgroundColor:'gray',height:50,width:
React Native 获取设备的宽高
最新推荐文章于 2023-03-29 16:04:56 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)