React Native 移动应用开发与测试全解析
一、使用 React Native 创建移动应用导航
1.1 导航基础与视图准备
在移动应用中,导航是关键部分。我们先从创建简单视图开始,为导航系统搭建基础。以下是创建视图的代码示例:
// Source file: src/routingApp/screens.js
/* @flow */
import React, { Component } from "react";
import {
Button,
Image,
StyleSheet,
Text,
TouchableOpacity,
View
} from "react-native";
const myStyles = StyleSheet.create({
fullSize: {
flex: 1
},
fullCenteredView: {
flex: 1,
flexDirection: "column",
justifyContent: "center",
alignItems: "center"
},
bigText: {
fontSize: 24,
fontWeight: "bold"
},
hamburger: {
width: 22,
height: 22,
alignSelf: "flex-end"
}
});
超级会员免费看
订阅专栏 解锁全文

101

被折叠的 条评论
为什么被折叠?



