底部安全距离&样式

This commit is contained in:
xianyi
2026-01-21 11:58:04 +08:00
parent 7ec05878fd
commit afb0edb20b
3 changed files with 27 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ import Animated, {
useSharedValue,
withTiming,
} from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
// 开启 Android 上的 LayoutAnimation
if (
@@ -45,6 +46,7 @@ export function MatchesByLeague({
onFavoriteToggle,
enableCollapsible = true,
}: MatchesByLeagueProps) {
const insets = useSafeAreaInsets();
const { theme } = useTheme();
const isDark = theme === "dark";
@@ -184,7 +186,10 @@ export function MatchesByLeague({
styles.container,
{ backgroundColor: isDark ? Colors.dark.background : "#FFFFFF" },
]}
contentContainerStyle={{ paddingBottom: 40, paddingTop: 8 }}
contentContainerStyle={{
paddingBottom: 80 + insets.bottom,
paddingTop: 8,
}}
>
{leagues.map((league) => {
const isCollapsed = collapsed[league.key] !== false;