底部安全距离&样式
This commit is contained in:
@@ -12,9 +12,11 @@ import {
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
|
||||
import { ThemedText } from "@/components/themed-text";
|
||||
import { IconSymbol } from "@/components/ui/icon-symbol";
|
||||
import { Colors } from "@/constants/theme";
|
||||
import { useAppState } from "@/context/AppStateContext";
|
||||
import { useTheme } from "@/context/ThemeContext";
|
||||
import { changeLanguage, SUPPORTED_LANGUAGES } from "@/i18n";
|
||||
@@ -37,6 +39,7 @@ const BOOKMAKERS = [
|
||||
export default function ProfileScreen() {
|
||||
const { theme, toggleTheme, setTheme, isSystemTheme, useSystemTheme } =
|
||||
useTheme();
|
||||
const insets = useSafeAreaInsets();
|
||||
const {
|
||||
state,
|
||||
updateOddsSettings,
|
||||
@@ -215,7 +218,7 @@ export default function ProfileScreen() {
|
||||
headerBackTitle: t("settings.back"),
|
||||
// Ensure header matches theme to avoid white flash
|
||||
headerStyle: {
|
||||
backgroundColor: isDark ? "#000" : "#f2f2f7",
|
||||
backgroundColor: isDark ? Colors.dark.background : "#f2f2f7",
|
||||
},
|
||||
headerTintColor: textColor,
|
||||
headerShadowVisible: false,
|
||||
@@ -223,14 +226,17 @@ export default function ProfileScreen() {
|
||||
presentation: "card",
|
||||
animation: "slide_from_right",
|
||||
// Set the scene/content background to match theme during transition
|
||||
contentStyle: { backgroundColor: isDark ? "#000" : "#f2f2f7" },
|
||||
contentStyle: {
|
||||
backgroundColor: isDark ? Colors.dark.background : "#f2f2f7",
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<ScrollView
|
||||
style={[
|
||||
styles.container,
|
||||
{ backgroundColor: isDark ? "#000" : "#f2f2f7" },
|
||||
{ backgroundColor: isDark ? Colors.dark.background : "#f2f2f7" },
|
||||
]}
|
||||
contentContainerStyle={{ paddingBottom: 80 + insets.bottom }}
|
||||
>
|
||||
<View
|
||||
style={[
|
||||
@@ -343,7 +349,11 @@ export default function ProfileScreen() {
|
||||
<ThemedText>{t("settings.language")}</ThemedText>
|
||||
</View>
|
||||
<View style={{ flexDirection: "row", alignItems: "center" }}>
|
||||
<ThemedText style={{ color: subTextColor, marginRight: 4 }}>
|
||||
<ThemedText
|
||||
numberOfLines={1}
|
||||
ellipsizeMode="tail"
|
||||
style={{ color: subTextColor, marginRight: 4, maxWidth: 140 }}
|
||||
>
|
||||
{getCurrentLanguageName()}
|
||||
</ThemedText>
|
||||
<IconSymbol
|
||||
@@ -798,7 +808,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
button: {
|
||||
paddingHorizontal: 10,
|
||||
paddingVertical: 5,
|
||||
paddingVertical: 0,
|
||||
},
|
||||
googleButton: {
|
||||
width: "100%",
|
||||
|
||||
Reference in New Issue
Block a user