Commit 0fe3f7ab authored by Lihinikaduwa D.N.R.  's avatar Lihinikaduwa D.N.R.

some changes

parent 2813a34e
...@@ -215,4 +215,4 @@ def reading(readingToken): ...@@ -215,4 +215,4 @@ def reading(readingToken):
return make_response(body) return make_response(body)
if __name__ == "__main__": if __name__ == "__main__":
app.run(host='192.168.8.100') app.run(host='192.168.1.100')
...@@ -12,7 +12,7 @@ def create_con(): ...@@ -12,7 +12,7 @@ def create_con():
database="helply", database="helply",
host="127.0.0.1", host="127.0.0.1",
user="root", user="root",
password="rp19970520" password="12345678"
) )
return db return db
......
...@@ -4,6 +4,13 @@ export const ImagePaths = { ...@@ -4,6 +4,13 @@ export const ImagePaths = {
summery: require('../image/ReadHeaderImg4.webp'), summery: require('../image/ReadHeaderImg4.webp'),
robot1: require('../image/robot1.png'), robot1: require('../image/robot1.png'),
robot2: require('../image/activity-2-rob.png'), robot2: require('../image/activity-2-rob.png'),
backgroundBasic: require('../image/activity-2-backg.jpeg'),
no: require('../image/no.png'),
go: require('../image/go.png'),
he: require('../image/he.png'),
bird: require('../image/bird.png'),
dog: require('../image/dog.png'),
fish: require('../image/fish.png'),
}; };
export const DummyReadResult = { export const DummyReadResult = {
......
...@@ -19,6 +19,9 @@ import White from '../screen/activity/White'; ...@@ -19,6 +19,9 @@ import White from '../screen/activity/White';
import Read from '../screen/Read'; import Read from '../screen/Read';
import ReadActivity from '../screen/reading/ReadActivity'; import ReadActivity from '../screen/reading/ReadActivity';
import ReadActivityBird from '../screen/reading/advanced/ReadActivityBird'; import ReadActivityBird from '../screen/reading/advanced/ReadActivityBird';
import ReadActivityNo from '../screen/reading/basic/ReadActivityNo';
import ReadActivityGo from '../screen/reading/basic/ReadActivityGo';
import ReadActivityHe from '../screen/reading/basic/ReadActivityHe';
import ColorResult from '../screen/result/ColorResult'; import ColorResult from '../screen/result/ColorResult';
import PrimaryType from '../screen/activity/PrimaryType'; import PrimaryType from '../screen/activity/PrimaryType';
import SecondaryType from '../screen/activity/SecondaryType'; import SecondaryType from '../screen/activity/SecondaryType';
...@@ -129,6 +132,21 @@ const AppRouter = () => { ...@@ -129,6 +132,21 @@ const AppRouter = () => {
name="ReadActivity" name="ReadActivity"
component={ReadActivity} component={ReadActivity}
/> />
<Stack.Screen
options={{headerShown: false}}
name="ReadActivityNo"
component={ReadActivityNo}
/>
<Stack.Screen
options={{headerShown: false}}
name="ReadActivityGo"
component={ReadActivityGo}
/>
<Stack.Screen
options={{headerShown: false}}
name="ReadActivityHe"
component={ReadActivityHe}
/>
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{headerShown: false}}
name="ReadActivityBird" name="ReadActivityBird"
......
import { useNavigation } from '@react-navigation/native'; import {useNavigation} from '@react-navigation/native';
import axios from 'axios'; import axios from 'axios';
import Orientation from 'react-native-orientation-locker'; import Orientation from 'react-native-orientation-locker';
import React, { useState, useEffect } from 'react'; import React, {useState, useEffect} from 'react';
import { import {
StyleSheet, StyleSheet,
View, View,
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
import ImageButton from '../component/ImageButton'; import ImageButton from '../component/ImageButton';
import ButtonView from '../component/buttonView'; import ButtonView from '../component/buttonView';
import ReadCategory from '../component/reading/ReadCategory'; import ReadCategory from '../component/reading/ReadCategory';
import { ImagePaths } from '../assets/read/data/ReadData'; import {ImagePaths} from '../assets/read/data/ReadData';
export default function Read() { export default function Read() {
const [activity, setActivity] = useState([]); const [activity, setActivity] = useState([]);
...@@ -53,7 +53,7 @@ export default function Read() { ...@@ -53,7 +53,7 @@ export default function Read() {
<ReadCategory <ReadCategory
title={'Basic'} title={'Basic'}
image={ImagePaths.roundOne} image={ImagePaths.roundOne}
path={'ReadActivity'} path={'ReadActivityNo'}
/> />
<ReadCategory <ReadCategory
title={'Advanced'} title={'Advanced'}
......
...@@ -2,6 +2,6 @@ import axios from 'axios'; ...@@ -2,6 +2,6 @@ import axios from 'axios';
// export default axios.create({ baseURL: 'http://192.168.8.102:5000/', timeout: 15000, }); // export default axios.create({ baseURL: 'http://192.168.8.102:5000/', timeout: 15000, });
export default axios.create({ export default axios.create({
baseURL: 'http://192.168.8.100:5000/', baseURL: 'http://192.168.1.100:5000/',
timeout: 15000, timeout: 15000,
}); });
...@@ -106,14 +106,6 @@ export default function ReadActivity() { ...@@ -106,14 +106,6 @@ export default function ReadActivity() {
<Text style={styles.text}>Pronounce this Word!</Text> <Text style={styles.text}>Pronounce this Word!</Text>
</View> </View>
</View> </View>
{/* <View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text>
</View>
<View style={styles.robo}>
<Image
source={require('../../assets/read/activity-2-rob.png')}></Image>
</View> */}
<View> <View>
<Image <Image
style={styles.blackboard} style={styles.blackboard}
...@@ -158,7 +150,6 @@ const styles = StyleSheet.create({ ...@@ -158,7 +150,6 @@ const styles = StyleSheet.create({
box: { box: {
width: 180, width: 180,
height: 180, height: 180,
// borderColor: "#000000",
backgroundColor: 'blue', backgroundColor: 'blue',
marginTop: -370, marginTop: -370,
marginLeft: 455, marginLeft: 455,
...@@ -177,8 +168,8 @@ const styles = StyleSheet.create({ ...@@ -177,8 +168,8 @@ const styles = StyleSheet.create({
height: 200, height: 200,
}, },
textBody: { textBody: {
marginTop: 150, marginTop: 130,
marginLeft: -30, marginLeft: -50,
// backgroundColor: '#00008B', // backgroundColor: '#00008B',
width: 150, width: 150,
borderRadius: 50, borderRadius: 50,
...@@ -190,7 +181,7 @@ const styles = StyleSheet.create({ ...@@ -190,7 +181,7 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
color: '#00008B', color: '#00008B',
borderRadius: 10, borderRadius: 10,
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
}, },
...@@ -205,7 +196,7 @@ const styles = StyleSheet.create({ ...@@ -205,7 +196,7 @@ const styles = StyleSheet.create({
height: 50, height: 50,
}, },
horizontalView: { horizontalView: {
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(23, 0, 245, 0.17)',
borderRadius: 50, borderRadius: 50,
flexDirection: 'row', flexDirection: 'row',
position: 'absolute', position: 'absolute',
......
...@@ -14,9 +14,11 @@ import { ...@@ -14,9 +14,11 @@ import {
TouchableHighlight, TouchableHighlight,
} from 'react-native'; } from 'react-native';
import Voice from '@react-native-voice/voice'; import Voice from '@react-native-voice/voice';
import {DummyReadResult} from '../../assets/read/data/ReadData'; import {DummyReadResult, ImagePaths} from '../../../assets/read/data/ReadData';
export default function ReadActivityGo() { export default function ReadActivityGo() {
const navigation = useNavigation();
const [pitch, setPitch] = useState(''); const [pitch, setPitch] = useState('');
const [error, setError] = useState(''); const [error, setError] = useState('');
const [end, setEnd] = useState(''); const [end, setEnd] = useState('');
...@@ -60,6 +62,7 @@ export default function ReadActivityGo() { ...@@ -60,6 +62,7 @@ export default function ReadActivityGo() {
if (result.includes('hello')) { if (result.includes('hello')) {
console.log('correct'); console.log('correct');
navigation.navigate('ReadActivityHe');
} }
}; };
...@@ -94,12 +97,11 @@ export default function ReadActivityGo() { ...@@ -94,12 +97,11 @@ export default function ReadActivityGo() {
<View style={{flexDirection: 'column'}}> <View style={{flexDirection: 'column'}}>
<ImageBackground <ImageBackground
style={styles.image} style={styles.image}
source={require('../../assets/read/image/activity-2-backg.jpeg')}> source={ImagePaths.backgroundBasic}>
<View style={styles.imageContainer}> <View style={styles.imageContainer}>
<View style={styles.imageView}> <View style={styles.imageView}>
<View style={styles.robo}> <View style={styles.robo}>
<Image <Image source={ImagePaths.robot2}></Image>
source={require('../../assets/read/image/activity-2-rob.png')}></Image>
</View> </View>
</View> </View>
<View style={styles.textBody}> <View style={styles.textBody}>
...@@ -115,9 +117,7 @@ export default function ReadActivityGo() { ...@@ -115,9 +117,7 @@ export default function ReadActivityGo() {
</View> */} </View> */}
<View> <View>
<Image <Image style={styles.blackboard} source={ImagePaths.go}></Image>
style={styles.blackboard}
source={require('../../assets/read/image/backboard3.png')}></Image>
</View> </View>
<View style={styles.horizontalView}> <View style={styles.horizontalView}>
<TouchableHighlight onPress={startRecording}> <TouchableHighlight onPress={startRecording}>
...@@ -158,7 +158,6 @@ const styles = StyleSheet.create({ ...@@ -158,7 +158,6 @@ const styles = StyleSheet.create({
box: { box: {
width: 180, width: 180,
height: 180, height: 180,
// borderColor: "#000000",
backgroundColor: 'blue', backgroundColor: 'blue',
marginTop: -370, marginTop: -370,
marginLeft: 455, marginLeft: 455,
...@@ -177,8 +176,8 @@ const styles = StyleSheet.create({ ...@@ -177,8 +176,8 @@ const styles = StyleSheet.create({
height: 200, height: 200,
}, },
textBody: { textBody: {
marginTop: 150, marginTop: 130,
marginLeft: -30, marginLeft: -50,
// backgroundColor: '#00008B', // backgroundColor: '#00008B',
width: 150, width: 150,
borderRadius: 50, borderRadius: 50,
...@@ -190,7 +189,7 @@ const styles = StyleSheet.create({ ...@@ -190,7 +189,7 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
color: '#00008B', color: '#00008B',
borderRadius: 10, borderRadius: 10,
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
}, },
...@@ -205,7 +204,7 @@ const styles = StyleSheet.create({ ...@@ -205,7 +204,7 @@ const styles = StyleSheet.create({
height: 50, height: 50,
}, },
horizontalView: { horizontalView: {
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(23, 0, 245, 0.17)',
borderRadius: 50, borderRadius: 50,
flexDirection: 'row', flexDirection: 'row',
position: 'absolute', position: 'absolute',
......
...@@ -14,9 +14,11 @@ import { ...@@ -14,9 +14,11 @@ import {
TouchableHighlight, TouchableHighlight,
} from 'react-native'; } from 'react-native';
import Voice from '@react-native-voice/voice'; import Voice from '@react-native-voice/voice';
import {DummyReadResult} from '../../assets/read/data/ReadData'; import {DummyReadResult, ImagePaths} from '../../../assets/read/data/ReadData';
export default function ReadActivityHe() { export default function ReadActivityHe() {
const navigation = useNavigation();
const [pitch, setPitch] = useState(''); const [pitch, setPitch] = useState('');
const [error, setError] = useState(''); const [error, setError] = useState('');
const [end, setEnd] = useState(''); const [end, setEnd] = useState('');
...@@ -60,6 +62,7 @@ export default function ReadActivityHe() { ...@@ -60,6 +62,7 @@ export default function ReadActivityHe() {
if (result.includes('hello')) { if (result.includes('hello')) {
console.log('correct'); console.log('correct');
navigation.navigate('ReadActivityHe');
} }
}; };
...@@ -94,30 +97,20 @@ export default function ReadActivityHe() { ...@@ -94,30 +97,20 @@ export default function ReadActivityHe() {
<View style={{flexDirection: 'column'}}> <View style={{flexDirection: 'column'}}>
<ImageBackground <ImageBackground
style={styles.image} style={styles.image}
source={require('../../assets/read/image/activity-2-backg.jpeg')}> source={ImagePaths.backgroundBasic}>
<View style={styles.imageContainer}> <View style={styles.imageContainer}>
<View style={styles.imageView}> <View style={styles.imageView}>
<View style={styles.robo}> <View style={styles.robo}>
<Image <Image source={ImagePaths.robot2}></Image>
source={require('../../assets/read/image/activity-2-rob.png')}></Image>
</View> </View>
</View> </View>
<View style={styles.textBody}> <View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text> <Text style={styles.text}>Pronounce this Word!</Text>
</View> </View>
</View> </View>
{/* <View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text>
</View>
<View style={styles.robo}>
<Image
source={require('../../assets/read/activity-2-rob.png')}></Image>
</View> */}
<View> <View>
<Image <Image style={styles.blackboard} source={ImagePaths.he}></Image>
style={styles.blackboard}
source={require('../../assets/read/image/backboard3.png')}></Image>
</View> </View>
<View style={styles.horizontalView}> <View style={styles.horizontalView}>
<TouchableHighlight onPress={startRecording}> <TouchableHighlight onPress={startRecording}>
...@@ -158,7 +151,6 @@ const styles = StyleSheet.create({ ...@@ -158,7 +151,6 @@ const styles = StyleSheet.create({
box: { box: {
width: 180, width: 180,
height: 180, height: 180,
// borderColor: "#000000",
backgroundColor: 'blue', backgroundColor: 'blue',
marginTop: -370, marginTop: -370,
marginLeft: 455, marginLeft: 455,
...@@ -177,8 +169,8 @@ const styles = StyleSheet.create({ ...@@ -177,8 +169,8 @@ const styles = StyleSheet.create({
height: 200, height: 200,
}, },
textBody: { textBody: {
marginTop: 150, marginTop: 130,
marginLeft: -30, marginLeft: -50,
// backgroundColor: '#00008B', // backgroundColor: '#00008B',
width: 150, width: 150,
borderRadius: 50, borderRadius: 50,
...@@ -190,7 +182,7 @@ const styles = StyleSheet.create({ ...@@ -190,7 +182,7 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
color: '#00008B', color: '#00008B',
borderRadius: 10, borderRadius: 10,
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
}, },
...@@ -205,7 +197,7 @@ const styles = StyleSheet.create({ ...@@ -205,7 +197,7 @@ const styles = StyleSheet.create({
height: 50, height: 50,
}, },
horizontalView: { horizontalView: {
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(23, 0, 245, 0.17)',
borderRadius: 50, borderRadius: 50,
flexDirection: 'row', flexDirection: 'row',
position: 'absolute', position: 'absolute',
......
...@@ -14,9 +14,11 @@ import { ...@@ -14,9 +14,11 @@ import {
TouchableHighlight, TouchableHighlight,
} from 'react-native'; } from 'react-native';
import Voice from '@react-native-voice/voice'; import Voice from '@react-native-voice/voice';
import {DummyReadResult} from '../../assets/read/data/ReadData'; import {DummyReadResult, ImagePaths} from '../../../assets/read/data/ReadData';
export default function ReadActivityNo() { export default function ReadActivityNo() {
const navigation = useNavigation();
const [pitch, setPitch] = useState(''); const [pitch, setPitch] = useState('');
const [error, setError] = useState(''); const [error, setError] = useState('');
const [end, setEnd] = useState(''); const [end, setEnd] = useState('');
...@@ -60,6 +62,7 @@ export default function ReadActivityNo() { ...@@ -60,6 +62,7 @@ export default function ReadActivityNo() {
if (result.includes('hello')) { if (result.includes('hello')) {
console.log('correct'); console.log('correct');
navigation.navigate('ReadActivityGo');
} }
}; };
...@@ -94,30 +97,20 @@ export default function ReadActivityNo() { ...@@ -94,30 +97,20 @@ export default function ReadActivityNo() {
<View style={{flexDirection: 'column'}}> <View style={{flexDirection: 'column'}}>
<ImageBackground <ImageBackground
style={styles.image} style={styles.image}
source={require('../../assets/read/image/activity-2-backg.jpeg')}> source={ImagePaths.backgroundBasic}>
<View style={styles.imageContainer}> <View style={styles.imageContainer}>
<View style={styles.imageView}> <View style={styles.imageView}>
<View style={styles.robo}> <View style={styles.robo}>
<Image <Image source={ImagePaths.robot2}></Image>
source={require('../../assets/read/image/activity-2-rob.png')}></Image>
</View> </View>
</View> </View>
<View style={styles.textBody}> <View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text> <Text style={styles.text}>Pronounce this Word!</Text>
</View> </View>
</View> </View>
{/* <View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text>
</View>
<View style={styles.robo}>
<Image
source={require('../../assets/read/activity-2-rob.png')}></Image>
</View> */}
<View> <View>
<Image <Image style={styles.blackboard} source={ImagePaths.no}></Image>
style={styles.blackboard}
source={require('../../assets/read/image/backboard3.png')}></Image>
</View> </View>
<View style={styles.horizontalView}> <View style={styles.horizontalView}>
<TouchableHighlight onPress={startRecording}> <TouchableHighlight onPress={startRecording}>
...@@ -158,7 +151,6 @@ const styles = StyleSheet.create({ ...@@ -158,7 +151,6 @@ const styles = StyleSheet.create({
box: { box: {
width: 180, width: 180,
height: 180, height: 180,
// borderColor: "#000000",
backgroundColor: 'blue', backgroundColor: 'blue',
marginTop: -370, marginTop: -370,
marginLeft: 455, marginLeft: 455,
...@@ -177,8 +169,8 @@ const styles = StyleSheet.create({ ...@@ -177,8 +169,8 @@ const styles = StyleSheet.create({
height: 200, height: 200,
}, },
textBody: { textBody: {
marginTop: 150, marginTop: 130,
marginLeft: -30, marginLeft: -50,
// backgroundColor: '#00008B', // backgroundColor: '#00008B',
width: 150, width: 150,
borderRadius: 50, borderRadius: 50,
...@@ -190,7 +182,7 @@ const styles = StyleSheet.create({ ...@@ -190,7 +182,7 @@ const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
color: '#00008B', color: '#00008B',
borderRadius: 10, borderRadius: 10,
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
}, },
...@@ -205,7 +197,7 @@ const styles = StyleSheet.create({ ...@@ -205,7 +197,7 @@ const styles = StyleSheet.create({
height: 50, height: 50,
}, },
horizontalView: { horizontalView: {
backgroundColor: 'rgba(0,0,0,0.2)', backgroundColor: 'rgba(23, 0, 245, 0.17)',
borderRadius: 50, borderRadius: 50,
flexDirection: 'row', flexDirection: 'row',
position: 'absolute', position: 'absolute',
......
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