import { Ionicons } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import React from 'react';
import {
Image,
ImageBackground,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { Colors } from '@/constants/Colors';
type Exercise = {
id: string;
title: string;
duration: string;
imageUri: string;
};
const EXERCISES: Exercise[] = [
{
id: '1',
title: 'Jumping Jacks',
duration: '00:30',
imageUri:
'https://images.unsplash.com/photo-1546483875-ad9014c88eba?q=80&w=400&auto=format&fit=crop',
},
{
id: '2',
title: 'Squats',
duration: '00:45',
imageUri:
'https://images.unsplash.com/photo-1583454110551-21f2fa2f36f0?q=80&w=400&auto=format&fit=crop',
},
{
id: '3',
title: 'Backward Lunge',
duration: '00:40',
imageUri:
'https://images.unsplash.com/photo-1597074866923-5c3bfa3b6c46?q=80&w=400&auto=format&fit=crop',
},
{
id: '4',
title: 'High Knees',
duration: '00:30',
imageUri:
'https://images.unsplash.com/photo-1596357395104-5bcae0b1a5eb?q=80&w=400&auto=format&fit=crop',
},
];
export default function AIPostureAssessmentScreen() {
const router = useRouter();
const insets = useSafeAreaInsets();
const theme = Colors.dark; // 该页面采用深色视觉
return (
{/* Header */}
router.back()}
style={styles.backButton}
>
AI体态评估
{/* Hero */}
{/* Floating stats */}
}
label="Time"
value="20 min"
/>
}
label="Burn"
value="95 kcal"
/>
{/* Title & description */}
Lower Body Training
The lower abdomen and hips are the most difficult areas of the body to reduce when we are on
a diet. Even so, in this area, especially the legs as a whole, you can reduce weight even if
you don't use tools.
{/* Rounds header */}
Rounds
1/8
{/* Exercise list */}
{EXERCISES.map((item) => (
)
)}
{/* Bottom CTA */}
{ }}
style={[styles.bottomCta, { backgroundColor: theme.primary }]}
>
Lets Workout
);
}
function StatCard({
icon,
label,
value,
}: {
icon: React.ReactNode;
label: string;
value: string;
}) {
return (
{icon}
{label}
{value}
);
}
function ExerciseItem({ exercise }: { exercise: Exercise }) {
return (
{exercise.title}
{exercise.duration}
);
}
const styles = StyleSheet.create({
screen: {
flex: 1,
},
header: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
paddingHorizontal: 16,
},
backButton: {
width: 32,
height: 32,
borderRadius: 16,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'rgba(255,255,255,0.06)',
},
headerTitle: {
fontSize: 22,
color: '#ECEDEE',
fontWeight: '700',
},
heroContainer: {
marginTop: 14,
marginHorizontal: 16,
},
heroImage: {
height: 260,
borderRadius: 28,
overflow: 'hidden',
justifyContent: 'flex-end',
},
heroOverlay: {
...StyleSheet.absoluteFillObject,
backgroundColor: 'rgba(0,0,0,0.18)',
borderRadius: 28,
},
statsFloating: {
position: 'absolute',
left: 22,
right: 22,
bottom: -26,
height: 72,
borderRadius: 20,
backgroundColor: '#1E262C',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-around',
paddingHorizontal: 14,
shadowColor: '#000',
shadowOpacity: 0.3,
shadowRadius: 10,
shadowOffset: { width: 0, height: 6 },
elevation: 6,
},
divider: {
width: 1,
height: 36,
backgroundColor: 'rgba(255,255,255,0.08)',
},
statCard: {
flexDirection: 'row',
alignItems: 'center',
},
statIconWrap: {
width: 36,
height: 36,
borderRadius: 12,
backgroundColor: '#BBF246',
alignItems: 'center',
justifyContent: 'center',
},
statLabel: {
color: 'rgba(255,255,255,0.75)',
fontSize: 12,
marginBottom: 2,
},
statValue: {
color: '#ECEDEE',
fontSize: 16,
fontWeight: '700',
},
contentSection: {
marginTop: 46,
paddingHorizontal: 20,
gap: 12,
},
title: {
fontSize: 28,
color: '#ECEDEE',
fontWeight: '800',
},
description: {
fontSize: 15,
lineHeight: 22,
color: 'rgba(255,255,255,0.75)',
},
roundsHeader: {
marginTop: 18,
paddingHorizontal: 20,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
},
roundsTitle: {
color: '#ECEDEE',
fontSize: 22,
fontWeight: '700',
},
roundsCount: {
color: 'rgba(255,255,255,0.6)',
fontSize: 16,
},
exerciseItem: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#1E262C',
padding: 12,
borderRadius: 18,
},
exerciseThumb: {
width: 56,
height: 56,
borderRadius: 12,
},
exerciseTitle: {
color: '#ECEDEE',
fontSize: 16,
fontWeight: '600',
},
exerciseDuration: {
color: 'rgba(255,255,255,0.6)',
marginTop: 4,
fontSize: 13,
},
exercisePlayButton: {
width: 36,
height: 36,
borderRadius: 18,
borderWidth: 1,
borderColor: 'rgba(255,255,255,0.2)',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#192126',
},
bottomCtaWrap: {
position: 'absolute',
left: 16,
right: 16,
bottom: 0,
},
bottomCta: {
height: 64,
borderRadius: 32,
alignItems: 'center',
justifyContent: 'center',
},
bottomCtaText: {
color: '#192126',
fontSize: 18,
fontWeight: '800',
},
});