import React from "react"; import { View, Text, TouchableOpacity, StyleSheet, StatusBar } from "react-native"; import { NativeStackScreenProps } from "@react-navigation/native-stack"; import { RootStackParamList } from "../App"; type Props = NativeStackScreenProps; export default function HomeScreen({ navigation }: Props) { return ( {/* 设置状态栏颜色 */} {/* 中间按钮 */} navigation.navigate("Scan")} > 搜索设备 {/* 底部区域 */} navigation.navigate("Privacy")}> 隐私协议 版本号 v0.0.1 ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#fff", }, centerBox: { flex: 1, justifyContent: "center", alignItems: "center", }, button: { backgroundColor: "#E7141E", // 红色按钮 paddingVertical: 15, paddingHorizontal: 40, borderRadius: 10, }, buttonText: { color: "#fff", fontSize: 18, fontWeight: "bold", }, bottomBox: { alignItems: "center", marginBottom: 20, }, privacyText: { fontSize: 16, color: "#E7141E", // 红色字体 marginBottom: 8, }, version: { fontSize: 14, color: "#999", }, });