import React from "react"; import { View, Text, TouchableOpacity, StyleSheet, StatusBar, Image } from "react-native"; import { NativeStackScreenProps,NativeStackNavigationProp } from "@react-navigation/native-stack"; import { RootStackParamList } from "../App"; import MyStatusbar from "./component/MyStatusbar"; import MyHeader from "./component/MyHeader"; import pxToDp from "./helper/pxToDp"; import DeviceInfo from "react-native-device-info"; import { useTranslation } from 'react-i18next'; type Props = NativeStackScreenProps; export default function HomeScreen({ navigation }: Props) { const { t } = useTranslation(); return ( {/* 设置状态栏颜色 */} navigation.navigate("Setting")}> }> {/* 中间按钮 */} navigation.navigate("Scan")} > {t("home.powerMeter")} navigation.navigate("ScanScreen2")} > {t("home.paddle")} navigation.navigate("ScanScreen3")} > {t("home.T5trainer")} ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#fff", }, centerBox: { flex: 1, // justifyContent: "center", alignItems: "center", backgroundColor:'#fff', paddingTop:pxToDp(250) }, button: { backgroundColor: "#E7141E", borderRadius: pxToDp(24), width:pxToDp(300), height:pxToDp(96), alignItems:'center', justifyContent:'center' }, buttonText: { color: "#fff", fontSize: pxToDp(32), fontWeight: "bold", }, bottomBox: { alignItems: "center", marginBottom: 20, }, privacyText: { fontSize: 16, color: "#E7141E", // 红色字体 marginBottom: 8, }, version: { fontSize: 14, color: "#999", }, });