活动页面适配顶部异形状
This commit is contained in:
@@ -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 (
|
||||
// SafeAreaView 适配顶部刘海
|
||||
<SafeAreaView style={styles.safeAreaContainer}> /
|
||||
<ThemedView><Text>活动</Text></ThemedView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
safeAreaContainer: {
|
||||
// 确保 SafeAreaView 占据整个屏幕
|
||||
flex: 1,
|
||||
// 您可能还需要在这里设置背景颜色,以确保状态栏区域的颜色正确
|
||||
backgroundColor: 'pink'
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user