1 changed files with 20 additions and 3 deletions
@ -1,9 +1,26 @@
|
||||
import { ThemedView } from "@/components/themed-view"; |
||||
import { Text } from "react-native"; |
||||
import { Text, SafeAreaView, StyleSheet } from "react-native"; |
||||
|
||||
export default function ActivityScreen() { |
||||
return ( |
||||
<ThemedView><Text>活动</Text></ThemedView> |
||||
// SafeAreaView 适配顶部刘海
|
||||
<SafeAreaView style={styles.safeAreaContainer}> / |
||||
<ThemedView><Text>活动</Text></ThemedView> |
||||
</SafeAreaView> |
||||
) |
||||
} |
||||
|
||||
|
||||
const styles = StyleSheet.create({ |
||||
safeAreaContainer: { |
||||
// 确保 SafeAreaView 占据整个屏幕
|
||||
flex: 1, |
||||
// 您可能还需要在这里设置背景颜色,以确保状态栏区域的颜色正确
|
||||
backgroundColor: 'pink' |
||||
}, |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}); |
||||
Loading…
Reference in new issue