feat: 适配 headerbar ios26

This commit is contained in:
richarjiang
2025-10-14 16:31:19 +08:00
parent cf069f3537
commit 435f5cc65c
41 changed files with 493 additions and 5445 deletions

View File

@@ -3,10 +3,10 @@ import { useColorScheme } from '@/hooks/useColorScheme';
import { getQuickWaterAmount, getWaterReminderSettings, setQuickWaterAmount } from '@/utils/userPreferences';
import { Ionicons } from '@expo/vector-icons';
import { Picker } from '@react-native-picker/picker';
import { useFocusEffect } from '@react-navigation/native';
import { LinearGradient } from 'expo-linear-gradient';
import { router } from 'expo-router';
import React, { useCallback, useEffect, useState } from 'react';
import { useFocusEffect } from '@react-navigation/native';
import {
Alert,
KeyboardAvoidingView,
@@ -15,15 +15,16 @@ import {
Pressable,
ScrollView,
StyleSheet,
Switch,
Text,
TouchableOpacity,
View
} from 'react-native';
import { HeaderBar } from '@/components/ui/HeaderBar';
import { useSafeAreaTop } from '@/hooks/useSafeAreaWithPadding';
const WaterSettings: React.FC = () => {
const safeAreaTop = useSafeAreaTop()
const theme = (useColorScheme() ?? 'light') as 'light' | 'dark';
const colorTokens = Colors[theme];
@@ -143,7 +144,7 @@ const WaterSettings: React.FC = () => {
>
<ScrollView
style={styles.scrollView}
contentContainerStyle={styles.scrollContent}
contentContainerStyle={[styles.scrollContent, { paddingTop: safeAreaTop }]}
showsVerticalScrollIndicator={false}
>
{/* 设置列表 */}