Commit 82cf4e3e authored by Devin B's avatar Devin B

Additional_symptoms

parent 73172d28
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native'; import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import { COLORS ,IMGS, ROUTES} from '../../../constants'; import { COLORS ,IMGS, ROUTES} from '../../../constants';
import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package
import Video from 'react-native-video'; // Make sure to install this package import Video from 'react-native-video'; // Make sure to install this package
import Button from '../../../components/Button'; import Button from '../../../components/Button';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
import { Dimensions } from 'react-native';
import { Linking } from 'react-native';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
...@@ -17,9 +19,37 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -17,9 +19,37 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const [controlsVisible, setControlsVisible] = useState(false); const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null); const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374540/3D/biile6hyrj1aiqvyvedi.mp4"; const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374532/3D/wfu4pr9phnadjqargex4.mp4";
const videoRef = useRef(null); const videoRef = useRef(null);
const screenHeight = Dimensions.get('window').height;
const imageHeight = screenHeight * 0.20;
const symptomsGroups = [
[
{ key: 'symptom1', text: 'Headache | හිසරදය' },
{ key: 'symptom2', text: 'Shoulder pain | උරහිස් වේදනාව' },
{ key: 'symptom3', text: 'Upper Abdominal pain | ඉහළ උදරයේ වේදනාව' },
{ key: 'symptom4', text: 'Lower Abdomen pain | පහළ උදරයේ වේදනාව' },
],
[
{ key: 'symptom5', text: 'Swollen Ankle pain | ඉදිමුණු වළලුකර වේදනාව' },
{ key: 'symptom6', text: 'Leg joint pain | පාදයේ සන්ධි වේදනාව' },
{ key: 'symptom7', text: 'Thigh muscle pain | කලවා මාංශ පේශි වේදනාව' },
{ key: 'symptom8', text: 'Groin pain | ඉකිලි වේදනාව' },
{ key: 'symptom9', text: 'Breast Pain |පියයුරු වේදනාව'},
{ key: 'symptom12', text: 'Side muscle pain | පැත්තේ මාංශ පේශි වේදනාව'},
],
[
{ key: 'symptom10', text: 'Upper arm pain | ඉහළ අතේ වේදනාව' },
{ key: 'symptom11', text: 'Heart burn | හදවත දැවෙනවා' },
{ key: 'symptom12', text: 'Mouth and Nose ulcer’s | මුඛයේ සහ නාසයේ වණ'},
{ key: 'symptom13', text: 'Back Pain |පිටුපස මාංශ පේශි වේදනාව'},
{ key: 'symptom14', text: 'Breast Pain |පියයුරු වේදනාව'},
],
// Add more groups as needed
];
const handleLoad = () => { const handleLoad = () => {
...@@ -79,13 +109,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -79,13 +109,15 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<ScrollView style={styles.scrollContainer}> <ScrollView style={styles.scrollContainer} contentContainerStyle={styles.contentContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Pupp Hives Additional Symptoms </Text> <Text style={styles.topicText}>Discoid Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<View style={styles.videoDescriptionBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Self diagnose with the 3D Model Self diagnose with the 3D Model
</Text> </Text>
</View>
<TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}> <TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}>
<Video <Video
// ref={videoRef} // ref={videoRef}
...@@ -106,44 +138,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -106,44 +138,51 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
)} )}
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<Text style={styles.checkboxLabel}>Check the related box</Text> <Image source={require('./skinassets/scanme.png')}
<View style={styles.checkboxContainer}> style={{ width: '50%', height: imageHeight, alignSelf: 'center', resizeMode: 'contain', marginBottom: -29 }} />
{/* Repeat this CheckBox component for each symptom */} <View style={styles.qrCodeBox}>
<View style={styles.individualCheckboxContainer}> <Image
<CheckBox source={require('./skinassets/QR1.png')} // Make sure the path is correct
value={selectedSymptoms['symptom1']} style={styles.qrCodeImage}
onValueChange={() => toggleCheckbox('symptom1')}
/>
<Text style={styles.checkboxText}>Scattered itchy bumps</Text>
</View>
<View style={styles.individualCheckboxContainer}>
<CheckBox
value={selectedSymptoms['symptom2']}
onValueChange={() => toggleCheckbox('symptom2')}
/> />
<Text style={styles.checkboxText}>Large red inflamed area across belly</Text> <TouchableOpacity
</View> style={styles.orButton}
<View style={styles.individualCheckboxContainer}> onPress={() => Linking.openURL('https://mywebar.com/p/Project_0_ysb0ffrwxn')}>
<CheckBox <Text style={styles.orButtonText}>OR Click This</Text>
value={selectedSymptoms['symptom3']} </TouchableOpacity>
onValueChange={() => toggleCheckbox('symptom3')} </View>
/> <Text style={styles.checkboxLabel}>Check the related box</Text>
<Text style={styles.checkboxText}>Yellow discharges</Text> <View style={styles.checkboxContainer}>
{symptomsGroups.map((group, index) => (
<View key={index}>
{group.map(symptom => (
<View style={styles.individualCheckboxContainer} key={symptom.key}>
<CheckBox
value={selectedSymptoms[symptom.key]}
onValueChange={() => toggleCheckbox(symptom.key)}
/>
<Text style={styles.checkboxText}>{symptom.text}</Text>
</View>
))}
{index !== symptomsGroups.length - 1 && (
<View style={styles.separator} />
)}
</View>
))}
</View> </View>
</View> </View>
</View>
<Button <Button
title="Continue for more information" title="Continue for more information"
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> />
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scrollContainer: { scrollContainer: {
flexGrow: 1, flexGrow: 1,
...@@ -170,20 +209,30 @@ const styles = StyleSheet.create({ ...@@ -170,20 +209,30 @@ const styles = StyleSheet.create({
marginVertical: 20, marginVertical: 20,
}, },
descriptionText: { descriptionText: {
fontSize: 16, fontSize: 18,
textAlign: 'center', textAlign: 'center',
marginHorizontal: 20, marginHorizontal: 20,
marginBottom: 20, marginBottom: 20,
color:COLORS.black,
fontWeight: 'bold',
},
separator: {
height: 2,
backgroundColor: COLORS.blue,
marginVertical: 10,
width: '90%', // Reduce width to see margins from container edges
alignSelf: 'center',
marginLeft:-197,
}, },
checkboxContainer: { checkboxContainer: {
backgroundColor: COLORS.lightBlue,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25, borderRadius: 25,
width:'100%', width: '100%', // Ensure it's taking the full width of its parent
alignSelf: 'center', // This ensures it's centered relative to the parent
paddingTop: 10,
marginLeft:197, marginLeft:197,
paddingTop:10
...@@ -193,6 +242,7 @@ const styles = StyleSheet.create({ ...@@ -193,6 +242,7 @@ const styles = StyleSheet.create({
fontWeight: 'bold', fontWeight: 'bold',
marginBottom: 10, marginBottom: 10,
alignSelf: 'center', alignSelf: 'center',
color:COLORS.black,
}, },
checkboxRow: { checkboxRow: {
flexDirection: 'row', flexDirection: 'row',
...@@ -202,6 +252,7 @@ const styles = StyleSheet.create({ ...@@ -202,6 +252,7 @@ const styles = StyleSheet.create({
checkboxText: { checkboxText: {
fontSize: 16, fontSize: 16,
marginLeft: 8, marginLeft: 8,
flexShrink: 1, // Allows the text to shrink and wrap onto the next line
}, },
submitButton: { submitButton: {
backgroundColor: COLORS.primary, backgroundColor: COLORS.primary,
...@@ -251,9 +302,10 @@ const styles = StyleSheet.create({ ...@@ -251,9 +302,10 @@ const styles = StyleSheet.create({
flexDirection: 'row', // Align checkbox and label in a row flexDirection: 'row', // Align checkbox and label in a row
alignItems: 'center', // Center align items vertically alignItems: 'center', // Center align items vertically
borderWidth: 0.6, // Optional border width borderWidth: 0.6, // Optional border width
width: '100%', // Width 100% to fill container width width: '98%', // Width 100% to fill container width
marginLeft:-100, marginLeft:-95,
elevation: 6, elevation: 6,
minHeight: 50,
}, },
...@@ -273,7 +325,7 @@ const styles = StyleSheet.create({ ...@@ -273,7 +325,7 @@ const styles = StyleSheet.create({
borderColor: '#80BCBD', // Set the border color borderColor: '#80BCBD', // Set the border color
borderRadius: 10, // Set border radius for rounded corners borderRadius: 10, // Set border radius for rounded corners
padding: 20, // Add padding around the content padding: 20, // Add padding around the content
marginBottom: 20, // Add bottom margin for spacing marginBottom: -20, // Add bottom margin for spacing
width: '100%', // Adjust the width as necessary width: '100%', // Adjust the width as necessary
alignSelf: 'center', // Center the box within its container alignSelf: 'center', // Center the box within its container
// Add shadows for elevation effect (optional) // Add shadows for elevation effect (optional)
...@@ -286,6 +338,7 @@ const styles = StyleSheet.create({ ...@@ -286,6 +338,7 @@ const styles = StyleSheet.create({
shadowRadius: 3.84, shadowRadius: 3.84,
elevation: 5, elevation: 5,
}, },
playPauseButton: { playPauseButton: {
position: 'absolute', position: 'absolute',
...@@ -306,6 +359,44 @@ const styles = StyleSheet.create({ ...@@ -306,6 +359,44 @@ const styles = StyleSheet.create({
contentContainer: { contentContainer: {
paddingBottom: 20, // Adds padding at the bottom paddingBottom: 20, // Adds padding at the bottom
}, },
qrCodeBox: {
width: '90%',
justifyContent: 'center',
alignItems: 'center',
padding: 20,
backgroundColor: COLORS.white,
marginBottom: 20,
shadowColor: "#000",
borderColor: '#80BCBD',
borderWidth: 2,
borderRadius: 10,
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
},
qrCodeImage: {
width: 200, // Adjust size as needed
height: 200, // Adjust size as needed
},
orButton: {
marginTop: 30,
backgroundColor: COLORS.primary,
padding: 10,
borderRadius: 5,
alignItems: 'center',
justifyContent: 'center',
},
orButtonText: {
color: COLORS.white,
fontSize: 14,
fontWeight: 'bold',
}
// ... possibly other styles // ... possibly other styles
}); });
......
...@@ -17,7 +17,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -17,7 +17,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
const [controlsVisible, setControlsVisible] = useState(false); const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null); const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374540/3D/biile6hyrj1aiqvyvedi.mp4"; const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374537/3D/ulxecngohldnmcizzrej.mp4";
const videoRef = useRef(null); const videoRef = useRef(null);
...@@ -81,7 +81,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -81,7 +81,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<ScrollView style={styles.scrollContainer}> <ScrollView style={styles.scrollContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Pupp Hives Additional Symptoms </Text> <Text style={styles.topicText}>patechiae Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Self diagnose with the 3D Model Self diagnose with the 3D Model
......
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, } from 'react-native'; import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import { COLORS ,IMGS, ROUTES} from '../../../constants'; import { COLORS ,IMGS, ROUTES} from '../../../constants';
import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package
import Video from 'react-native-video'; // Make sure to install this package import Video from 'react-native-video'; // Make sure to install this package
import Button from '../../../components/Button'; import Button from '../../../components/Button';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false, const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false,
symptom2: false, symptom2: false,
symptom3: false,}); symptom3: false,});
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [videoPaused, setVideoPaused] = useState(true); const [videoPaused, setVideoPaused] = useState(true);
const [fullscreen, setFullscreen] = useState(false);
const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374525/3D/tu1jhgaa6hvcyby5zybr.mp4";
const videoRef = useRef(null);
const handleLoad = () => { const handleLoad = () => {
...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps // Navigate or perform next steps
}; };
const toggleFullscreen = () => {
if (videoRef.current) {
if (!fullscreen) {
videoRef.current.presentFullscreenPlayer(); // This will open the video in fullscreen
} else {
videoRef.current.dismissFullscreenPlayer(); // This will exit the fullscreen mode
}
setFullscreen(!fullscreen); // Toggle the fullscreen state
}
};
const togglePlayPause = () => {
setVideoPaused(!videoPaused);
showControlsTemporarily(); // Toggle the pause state of the video
};
const showControlsTemporarily = () => {
setControlsVisible(true);
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
hideTimer.current = setTimeout(() => {
setControlsVisible(false);
}, 3000); // Hide controls after 3 seconds of inactivity
};
useEffect(() => {
return () => {
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
};
}, []);
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.container}> <ScrollView style={styles.scrollContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Maculopapular Additional Symptoms </Text> <Text style={styles.topicText}>Cytomegalovirus Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Watch the 3D Model Video to Identify Additional Symptoms and Check the Boxes for Your Experience Self diagnose with the 3D Model
</Text> </Text>
<View style={styles.videoContainer}> <TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}>
<Video <Video
source={require("./skinassets/add1.mp4")} // Replace with the path to your video file // ref={videoRef}
style={styles.video} source={{ uri: URL_link }} // Replace with the path to your video file
controls={true} style={[styles.video, { height: fullscreen ? '100%' : 300 }]}
paused={videoPaused} paused={videoPaused}
resizeMode="contain" // This ensures the video fits within its container resizeMode="contain" // This ensures the video fits within its container
onLoad={handleLoad} onLoad={() => setVideoPaused(false)}
onBuffer={handleBuffer}
onError={(error) => console.error('Video playback error:', error)} onError={(error) => console.error('Video playback error:', error)}
/> />
</View> {controlsVisible && (
<TouchableOpacity style={styles.playPauseButton} onPress={togglePlayPause}>
<Image
style={styles.playPauseIcon}
source={videoPaused ? require('./skinassets/play.png') : require('./skinassets/pause.png')}
/>
</TouchableOpacity>
)}
</TouchableOpacity>
</View> </View>
<Text style={styles.checkboxLabel}>Check the related box</Text> <Text style={styles.checkboxLabel}>Check the related box</Text>
<ScrollView style={styles.scrollContainer} >
<View style={styles.checkboxContainer}> <View style={styles.checkboxContainer}>
{/* Repeat this CheckBox component for each symptom */} {/* Repeat this CheckBox component for each symptom */}
<View style={styles.individualCheckboxContainer}> <View style={styles.individualCheckboxContainer}>
...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<Text style={styles.checkboxText}>Yellow discharges</Text> <Text style={styles.checkboxText}>Yellow discharges</Text>
</View> </View>
</View> </View>
</ScrollView>
</View> </View>
<Button <Button
...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> />
</View> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scrollContainer: { scrollContainer: {
padding: 40, flexGrow: 1,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25,
width:'110%',
marginBottom:-20,
paddingTop:-100,
}, },
...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({ ...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
}, },
topContainer: { topContainer: {
flex: 3, flex: 1,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({ ...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer: { checkboxContainer: {
padding: 60,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25, borderRadius: 25,
width:'130%', width:'100%',
marginBottom:10, marginLeft:197,
marginLeft:40 paddingTop:10
}, },
...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({ ...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'black'
}, },
video: { video: {
width: '100%', width: '110%',
height: '100%', height: '100%',
}, },
...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({ ...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
}, },
fullscreenButton: {
marginTop: 10,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: 10,
borderRadius: 5,
},
fullscreenButtonText: {
color: '#fff',
},
videoBox: { videoBox: {
backgroundColor: COLORS.white, // Set background color to white backgroundColor: COLORS.white, // Set background color to white
borderWidth: 2, // Set the border width borderWidth: 2, // Set the border width
...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({ ...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius: 10, // Set border radius for rounded corners borderRadius: 10, // Set border radius for rounded corners
padding: 20, // Add padding around the content padding: 20, // Add padding around the content
marginBottom: 20, // Add bottom margin for spacing marginBottom: 20, // Add bottom margin for spacing
width: '90%', // Adjust the width as necessary width: '100%', // Adjust the width as necessary
alignSelf: 'center', // Center the box within its container alignSelf: 'center', // Center the box within its container
// Add shadows for elevation effect (optional) // Add shadows for elevation effect (optional)
shadowColor: "#000", shadowColor: "#000",
...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({ ...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius: 3.84, shadowRadius: 3.84,
elevation: 5, elevation: 5,
}, },
playPauseButton: {
position: 'absolute',
top: '50%',
left: '50%',
bottom:'30%',
transform: [{ translateX: -25 }, { translateY: -25 }],
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
},
playPauseIcon: {
width: 50,
height: 50,
},
contentContainer: {
paddingBottom: 20, // Adds padding at the bottom
},
// ... possibly other styles // ... possibly other styles
}); });
......
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, } from 'react-native'; import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import { COLORS ,IMGS, ROUTES} from '../../../constants'; import { COLORS ,IMGS, ROUTES} from '../../../constants';
import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package
import Video from 'react-native-video'; // Make sure to install this package import Video from 'react-native-video'; // Make sure to install this package
import Button from '../../../components/Button'; import Button from '../../../components/Button';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false, const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false,
symptom2: false, symptom2: false,
symptom3: false,}); symptom3: false,});
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [videoPaused, setVideoPaused] = useState(true); const [videoPaused, setVideoPaused] = useState(true);
const [fullscreen, setFullscreen] = useState(false);
const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374517/3D/q2zk6ka9aqamthwgn1vv.mp4";
const videoRef = useRef(null);
const handleLoad = () => { const handleLoad = () => {
...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps // Navigate or perform next steps
}; };
const toggleFullscreen = () => {
if (videoRef.current) {
if (!fullscreen) {
videoRef.current.presentFullscreenPlayer(); // This will open the video in fullscreen
} else {
videoRef.current.dismissFullscreenPlayer(); // This will exit the fullscreen mode
}
setFullscreen(!fullscreen); // Toggle the fullscreen state
}
};
const togglePlayPause = () => {
setVideoPaused(!videoPaused);
showControlsTemporarily(); // Toggle the pause state of the video
};
const showControlsTemporarily = () => {
setControlsVisible(true);
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
hideTimer.current = setTimeout(() => {
setControlsVisible(false);
}, 3000); // Hide controls after 3 seconds of inactivity
};
useEffect(() => {
return () => {
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
};
}, []);
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.container}> <ScrollView style={styles.scrollContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Melanoma Additional Symptoms </Text> <Text style={styles.topicText}>Herpes Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Watch the 3D Model Video to Identify Additional Symptoms and Check the Boxes for Your Experience Self diagnose with the 3D Model
</Text> </Text>
<View style={styles.videoContainer}> <TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}>
<Video <Video
source={require("./skinassets/add1.mp4")} // Replace with the path to your video file // ref={videoRef}
style={styles.video} source={{ uri: URL_link }} // Replace with the path to your video file
controls={true} style={[styles.video, { height: fullscreen ? '100%' : 300 }]}
paused={videoPaused} paused={videoPaused}
resizeMode="contain" // This ensures the video fits within its container resizeMode="contain" // This ensures the video fits within its container
onLoad={handleLoad} onLoad={() => setVideoPaused(false)}
onBuffer={handleBuffer}
onError={(error) => console.error('Video playback error:', error)} onError={(error) => console.error('Video playback error:', error)}
/> />
</View> {controlsVisible && (
<TouchableOpacity style={styles.playPauseButton} onPress={togglePlayPause}>
<Image
style={styles.playPauseIcon}
source={videoPaused ? require('./skinassets/play.png') : require('./skinassets/pause.png')}
/>
</TouchableOpacity>
)}
</TouchableOpacity>
</View> </View>
<Text style={styles.checkboxLabel}>Check the related box</Text> <Text style={styles.checkboxLabel}>Check the related box</Text>
<ScrollView style={styles.scrollContainer} >
<View style={styles.checkboxContainer}> <View style={styles.checkboxContainer}>
{/* Repeat this CheckBox component for each symptom */} {/* Repeat this CheckBox component for each symptom */}
<View style={styles.individualCheckboxContainer}> <View style={styles.individualCheckboxContainer}>
...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<Text style={styles.checkboxText}>Yellow discharges</Text> <Text style={styles.checkboxText}>Yellow discharges</Text>
</View> </View>
</View> </View>
</ScrollView>
</View> </View>
<Button <Button
...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> />
</View> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scrollContainer: { scrollContainer: {
padding: 40, flexGrow: 1,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25,
width:'110%',
marginBottom:-20,
paddingTop:-100,
}, },
...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({ ...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
}, },
topContainer: { topContainer: {
flex: 3, flex: 1,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({ ...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer: { checkboxContainer: {
padding: 60,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25, borderRadius: 25,
width:'130%', width:'100%',
marginBottom:10, marginLeft:197,
marginLeft:40 paddingTop:10
}, },
...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({ ...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'black'
}, },
video: { video: {
width: '100%', width: '110%',
height: '100%', height: '100%',
}, },
...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({ ...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
}, },
fullscreenButton: {
marginTop: 10,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: 10,
borderRadius: 5,
},
fullscreenButtonText: {
color: '#fff',
},
videoBox: { videoBox: {
backgroundColor: COLORS.white, // Set background color to white backgroundColor: COLORS.white, // Set background color to white
borderWidth: 2, // Set the border width borderWidth: 2, // Set the border width
...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({ ...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius: 10, // Set border radius for rounded corners borderRadius: 10, // Set border radius for rounded corners
padding: 20, // Add padding around the content padding: 20, // Add padding around the content
marginBottom: 20, // Add bottom margin for spacing marginBottom: 20, // Add bottom margin for spacing
width: '90%', // Adjust the width as necessary width: '100%', // Adjust the width as necessary
alignSelf: 'center', // Center the box within its container alignSelf: 'center', // Center the box within its container
// Add shadows for elevation effect (optional) // Add shadows for elevation effect (optional)
shadowColor: "#000", shadowColor: "#000",
...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({ ...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius: 3.84, shadowRadius: 3.84,
elevation: 5, elevation: 5,
}, },
playPauseButton: {
position: 'absolute',
top: '50%',
left: '50%',
bottom:'30%',
transform: [{ translateX: -25 }, { translateY: -25 }],
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
},
playPauseIcon: {
width: 50,
height: 50,
},
contentContainer: {
paddingBottom: 20, // Adds padding at the bottom
},
// ... possibly other styles // ... possibly other styles
}); });
......
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, } from 'react-native'; import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import { COLORS ,IMGS, ROUTES} from '../../../constants'; import { COLORS ,IMGS, ROUTES} from '../../../constants';
import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package
import Video from 'react-native-video'; // Make sure to install this package import Video from 'react-native-video'; // Make sure to install this package
import Button from '../../../components/Button'; import Button from '../../../components/Button';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false, const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false,
symptom2: false, symptom2: false,
symptom3: false,}); symptom3: false,});
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [videoPaused, setVideoPaused] = useState(true); const [videoPaused, setVideoPaused] = useState(true);
const [fullscreen, setFullscreen] = useState(false);
const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374529/3D/ri0w5kgmpchajypa7xfb.mp4";
const videoRef = useRef(null);
const handleLoad = () => { const handleLoad = () => {
...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps // Navigate or perform next steps
}; };
const toggleFullscreen = () => {
if (videoRef.current) {
if (!fullscreen) {
videoRef.current.presentFullscreenPlayer(); // This will open the video in fullscreen
} else {
videoRef.current.dismissFullscreenPlayer(); // This will exit the fullscreen mode
}
setFullscreen(!fullscreen); // Toggle the fullscreen state
}
};
const togglePlayPause = () => {
setVideoPaused(!videoPaused);
showControlsTemporarily(); // Toggle the pause state of the video
};
const showControlsTemporarily = () => {
setControlsVisible(true);
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
hideTimer.current = setTimeout(() => {
setControlsVisible(false);
}, 3000); // Hide controls after 3 seconds of inactivity
};
useEffect(() => {
return () => {
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
};
}, []);
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.container}> <ScrollView style={styles.scrollContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Patechiae Additional Symptoms </Text> <Text style={styles.topicText}>Pupp Hives Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Watch the 3D Model Video to Identify Additional Symptoms and Check the Boxes for Your Experience Self diagnose with the 3D Model
</Text> </Text>
<View style={styles.videoContainer}> <TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}>
<Video <Video
source={require("./skinassets/add1.mp4")} // Replace with the path to your video file // ref={videoRef}
style={styles.video} source={{ uri: URL_link }} // Replace with the path to your video file
controls={true} style={[styles.video, { height: fullscreen ? '100%' : 300 }]}
paused={videoPaused} paused={videoPaused}
resizeMode="contain" // This ensures the video fits within its container resizeMode="contain" // This ensures the video fits within its container
onLoad={handleLoad} onLoad={() => setVideoPaused(false)}
onBuffer={handleBuffer}
onError={(error) => console.error('Video playback error:', error)} onError={(error) => console.error('Video playback error:', error)}
/> />
</View> {controlsVisible && (
<TouchableOpacity style={styles.playPauseButton} onPress={togglePlayPause}>
<Image
style={styles.playPauseIcon}
source={videoPaused ? require('./skinassets/play.png') : require('./skinassets/pause.png')}
/>
</TouchableOpacity>
)}
</TouchableOpacity>
</View> </View>
<Text style={styles.checkboxLabel}>Check the related box</Text> <Text style={styles.checkboxLabel}>Check the related box</Text>
<ScrollView style={styles.scrollContainer} >
<View style={styles.checkboxContainer}> <View style={styles.checkboxContainer}>
{/* Repeat this CheckBox component for each symptom */} {/* Repeat this CheckBox component for each symptom */}
<View style={styles.individualCheckboxContainer}> <View style={styles.individualCheckboxContainer}>
...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<Text style={styles.checkboxText}>Yellow discharges</Text> <Text style={styles.checkboxText}>Yellow discharges</Text>
</View> </View>
</View> </View>
</ScrollView>
</View> </View>
<Button <Button
...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> />
</View> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scrollContainer: { scrollContainer: {
padding: 40, flexGrow: 1,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25,
width:'110%',
marginBottom:-20,
paddingTop:-100,
}, },
...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({ ...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
}, },
topContainer: { topContainer: {
flex: 3, flex: 1,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({ ...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer: { checkboxContainer: {
padding: 60,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25, borderRadius: 25,
width:'130%', width:'100%',
marginBottom:10, marginLeft:197,
marginLeft:40 paddingTop:10
}, },
...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({ ...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'black'
}, },
video: { video: {
width: '100%', width: '110%',
height: '100%', height: '100%',
}, },
...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({ ...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
}, },
fullscreenButton: {
marginTop: 10,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: 10,
borderRadius: 5,
},
fullscreenButtonText: {
color: '#fff',
},
videoBox: { videoBox: {
backgroundColor: COLORS.white, // Set background color to white backgroundColor: COLORS.white, // Set background color to white
borderWidth: 2, // Set the border width borderWidth: 2, // Set the border width
...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({ ...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius: 10, // Set border radius for rounded corners borderRadius: 10, // Set border radius for rounded corners
padding: 20, // Add padding around the content padding: 20, // Add padding around the content
marginBottom: 20, // Add bottom margin for spacing marginBottom: 20, // Add bottom margin for spacing
width: '90%', // Adjust the width as necessary width: '100%', // Adjust the width as necessary
alignSelf: 'center', // Center the box within its container alignSelf: 'center', // Center the box within its container
// Add shadows for elevation effect (optional) // Add shadows for elevation effect (optional)
shadowColor: "#000", shadowColor: "#000",
...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({ ...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius: 3.84, shadowRadius: 3.84,
elevation: 5, elevation: 5,
}, },
playPauseButton: {
position: 'absolute',
top: '50%',
left: '50%',
bottom:'30%',
transform: [{ translateX: -25 }, { translateY: -25 }],
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
},
playPauseIcon: {
width: 50,
height: 50,
},
contentContainer: {
paddingBottom: 20, // Adds padding at the bottom
},
// ... possibly other styles // ... possibly other styles
}); });
......
import React, { useState, useRef, useEffect } from 'react'; import React, { useState, useRef, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, } from 'react-native'; import { View, StyleSheet, Text, ScrollView, TouchableOpacity, ActivityIndicator, Image } from 'react-native';
import { COLORS ,IMGS, ROUTES} from '../../../constants'; import { COLORS ,IMGS, ROUTES} from '../../../constants';
import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package import CheckBox from '@react-native-community/checkbox'; // Make sure to install this package
import Video from 'react-native-video'; // Make sure to install this package import Video from 'react-native-video'; // Make sure to install this package
import Button from '../../../components/Button'; import Button from '../../../components/Button';
import { SafeAreaView } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
const AdditionalSymptomsScreen = ({ navigation }) => { const AdditionalSymptomsScreen = ({ navigation }) => {
const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false, const [selectedSymptoms, setSelectedSymptoms] = useState({ symptom1: false,
symptom2: false, symptom2: false,
symptom3: false,}); symptom3: false,});
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [videoPaused, setVideoPaused] = useState(true); const [videoPaused, setVideoPaused] = useState(true);
const [fullscreen, setFullscreen] = useState(false);
const [controlsVisible, setControlsVisible] = useState(false);
const hideTimer = useRef(null);
const URL_link = "https://res.cloudinary.com/dl207ux6g/video/upload/v1715374540/3D/biile6hyrj1aiqvyvedi.mp4";
const videoRef = useRef(null);
const handleLoad = () => { const handleLoad = () => {
...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -36,30 +43,70 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
// Navigate or perform next steps // Navigate or perform next steps
}; };
const toggleFullscreen = () => {
if (videoRef.current) {
if (!fullscreen) {
videoRef.current.presentFullscreenPlayer(); // This will open the video in fullscreen
} else {
videoRef.current.dismissFullscreenPlayer(); // This will exit the fullscreen mode
}
setFullscreen(!fullscreen); // Toggle the fullscreen state
}
};
const togglePlayPause = () => {
setVideoPaused(!videoPaused);
showControlsTemporarily(); // Toggle the pause state of the video
};
const showControlsTemporarily = () => {
setControlsVisible(true);
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
hideTimer.current = setTimeout(() => {
setControlsVisible(false);
}, 3000); // Hide controls after 3 seconds of inactivity
};
useEffect(() => {
return () => {
if (hideTimer.current) {
clearTimeout(hideTimer.current);
}
};
}, []);
return ( return (
<SafeAreaView style={styles.container}> <SafeAreaView style={styles.container}>
<View style={styles.container}> <ScrollView style={styles.scrollContainer}>
<View style={styles.topContainer}> <View style={styles.topContainer}>
<Text style={styles.topicText}>Herpes HPV Additional Symptoms </Text> <Text style={styles.topicText}>Melanoma Additional Symptoms </Text>
<View style={styles.videoBox}> <View style={styles.videoBox}>
<Text style={styles.descriptionText}> <Text style={styles.descriptionText}>
Watch the 3D Model Video to Identify Additional Symptoms and Check the Boxes for Your Experience Self diagnose with the 3D Model
</Text> </Text>
<View style={styles.videoContainer}> <TouchableOpacity style={styles.videoContainer} onPress={showControlsTemporarily}>
<Video <Video
source={require("./skinassets/add1.mp4")} // Replace with the path to your video file // ref={videoRef}
style={styles.video} source={{ uri: URL_link }} // Replace with the path to your video file
controls={true} style={[styles.video, { height: fullscreen ? '100%' : 300 }]}
paused={videoPaused} paused={videoPaused}
resizeMode="contain" // This ensures the video fits within its container resizeMode="contain" // This ensures the video fits within its container
onLoad={handleLoad} onLoad={() => setVideoPaused(false)}
onBuffer={handleBuffer}
onError={(error) => console.error('Video playback error:', error)} onError={(error) => console.error('Video playback error:', error)}
/> />
</View> {controlsVisible && (
<TouchableOpacity style={styles.playPauseButton} onPress={togglePlayPause}>
<Image
style={styles.playPauseIcon}
source={videoPaused ? require('./skinassets/play.png') : require('./skinassets/pause.png')}
/>
</TouchableOpacity>
)}
</TouchableOpacity>
</View> </View>
<Text style={styles.checkboxLabel}>Check the related box</Text> <Text style={styles.checkboxLabel}>Check the related box</Text>
<ScrollView style={styles.scrollContainer} >
<View style={styles.checkboxContainer}> <View style={styles.checkboxContainer}>
{/* Repeat this CheckBox component for each symptom */} {/* Repeat this CheckBox component for each symptom */}
<View style={styles.individualCheckboxContainer}> <View style={styles.individualCheckboxContainer}>
...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -84,7 +131,7 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
<Text style={styles.checkboxText}>Yellow discharges</Text> <Text style={styles.checkboxText}>Yellow discharges</Text>
</View> </View>
</View> </View>
</ScrollView>
</View> </View>
<Button <Button
...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => { ...@@ -92,21 +139,14 @@ const AdditionalSymptomsScreen = ({ navigation }) => {
style={styles.nextButton} style={styles.nextButton}
onPress={() => navigation.navigate(ROUTES.SKIN_RISK)} onPress={() => navigation.navigate(ROUTES.SKIN_RISK)}
/> />
</View> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
}; };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
scrollContainer: { scrollContainer: {
padding: 40, flexGrow: 1,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25,
width:'110%',
marginBottom:-20,
paddingTop:-100,
}, },
...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({ ...@@ -115,7 +155,7 @@ const styles = StyleSheet.create({
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
}, },
topContainer: { topContainer: {
flex: 3, flex: 1,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: COLORS.white, backgroundColor: COLORS.white,
...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({ ...@@ -138,12 +178,13 @@ const styles = StyleSheet.create({
checkboxContainer: { checkboxContainer: {
padding: 60,
backgroundColor: COLORS.lightBlue, // Use a light pastel blue color backgroundColor: COLORS.lightBlue, // Use a light pastel blue color
borderRadius: 25, borderRadius: 25,
width:'130%', width:'100%',
marginBottom:10, marginLeft:197,
marginLeft:40 paddingTop:10
}, },
...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({ ...@@ -195,9 +236,10 @@ const styles = StyleSheet.create({
aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed aspectRatio: 16 / 9, // You can adjust this aspect ratio as needed
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'black'
}, },
video: { video: {
width: '100%', width: '110%',
height: '100%', height: '100%',
}, },
...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({ ...@@ -215,6 +257,16 @@ const styles = StyleSheet.create({
}, },
fullscreenButton: {
marginTop: 10,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
padding: 10,
borderRadius: 5,
},
fullscreenButtonText: {
color: '#fff',
},
videoBox: { videoBox: {
backgroundColor: COLORS.white, // Set background color to white backgroundColor: COLORS.white, // Set background color to white
borderWidth: 2, // Set the border width borderWidth: 2, // Set the border width
...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({ ...@@ -222,7 +274,7 @@ const styles = StyleSheet.create({
borderRadius: 10, // Set border radius for rounded corners borderRadius: 10, // Set border radius for rounded corners
padding: 20, // Add padding around the content padding: 20, // Add padding around the content
marginBottom: 20, // Add bottom margin for spacing marginBottom: 20, // Add bottom margin for spacing
width: '90%', // Adjust the width as necessary width: '100%', // Adjust the width as necessary
alignSelf: 'center', // Center the box within its container alignSelf: 'center', // Center the box within its container
// Add shadows for elevation effect (optional) // Add shadows for elevation effect (optional)
shadowColor: "#000", shadowColor: "#000",
...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({ ...@@ -234,6 +286,27 @@ const styles = StyleSheet.create({
shadowRadius: 3.84, shadowRadius: 3.84,
elevation: 5, elevation: 5,
}, },
playPauseButton: {
position: 'absolute',
top: '50%',
left: '50%',
bottom:'30%',
transform: [{ translateX: -25 }, { translateY: -25 }],
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
},
playPauseIcon: {
width: 50,
height: 50,
},
contentContainer: {
paddingBottom: 20, // Adds padding at the bottom
},
// ... possibly other styles // ... possibly other styles
}); });
......
...@@ -26,7 +26,7 @@ const RiskEvaluationScreen = ({ navigation }) => { ...@@ -26,7 +26,7 @@ const RiskEvaluationScreen = ({ navigation }) => {
<Text style={styles.subTopicText}>Why High Risk ?</Text> <Text style={styles.subTopicText}>Why High Risk ?</Text>
<View style={styles.audioPlayerContainer}> <View style={styles.audioPlayerContainer}>
<Video <Video
source={require("./skinassets/add1.mp4")} source={require("./skinassets/pause.png")}
style={styles.audioPlayer} style={styles.audioPlayer}
controls={true} controls={true}
audioOnly={true} audioOnly={true}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment