Commit f9792ff6 authored by Priyanka P D M K 's avatar Priyanka P D M K

update app frontend

parent 6578e6ce
......@@ -14,6 +14,7 @@
"@react-navigation/stack": "^6.3.16",
"expo": "~48.0.9",
"expo-av": "^13.2.1",
"expo-linking": "^4.0.1",
"expo-screen-orientation": "~5.1.1",
"expo-status-bar": "~1.4.4",
"react": "18.2.0",
......
import React from 'react';
import { View, Text, Image, TouchableOpacity, StyleSheet } from 'react-native';
import * as Linking from 'expo-linking';
const HomeScreen = ({ navigation }) => {
const openUnityApp = () => {
try {
//Linking.openURL('unitydl://mylink');
// Linking.openURL('fb://profile');
Linking.openURL("unitydl://mylink");
} catch (error) {
console.log("error on open unity app "+error);
}
}
return (
<View style={styles.container}>
<Image source={require('./assets/home/home_bg.png')} style={styles.backgroundImage} resizeMode="cover" />
......@@ -13,9 +27,9 @@ const HomeScreen = ({ navigation }) => {
<Text style={styles.buttonText}>Speech</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button2} onPress={() => navigation.navigate('ProgressMap')}>
<TouchableOpacity style={styles.button2} onPress={() => openUnityApp()}>
<Image source={require('./assets/home/balloon.png')} style={styles.buttonImage} resizeMode="cover" />
<Text style={styles.buttonText}>Progress</Text>
<Text style={styles.buttonText}>Quiz River</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button3} onPress={() => navigation.navigate('ObjectExplore')}>
......@@ -27,11 +41,6 @@ const HomeScreen = ({ navigation }) => {
<Image source={require('./assets/home/balloon.png')} style={styles.buttonImage} resizeMode="cover" />
<Text style={styles.buttonText}>Learn</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.buttonsettings} onPress={() => navigation.navigate('ContentFiltration')}>
<Image source={require('./assets/settings_icon.png')} style={styles.buttonImage} resizeMode="cover" />
<Text style={styles.buttonTextCensor}>Censor</Text>
</TouchableOpacity>
</View>
);
};
......@@ -113,20 +122,6 @@ const styles = StyleSheet.create({
textShadowOffset: { width: -1, height: 1 },
textShadowRadius: 10,
},
buttonsettings:{
top:-280,
right:-150,
size:1
},
buttonTextCensor: {
fontSize: 22,
fontWeight: 'bold',
color: 'black',
marginTop: -120,
textShadowOffset: { width: -1, height: 1 },
textShadowRadius: 10,
},
});
export default HomeScreen;
......@@ -4,7 +4,7 @@ import { StyleSheet, Text, View } from 'react-native';
export default function ScreenName() {
return (
<View style={styles.container}>
<Text style={styles.text}>Error: Andriod OS version not not compatible</Text>
<Text style={styles.text}>Sample screen</Text>
</View>
);
}
......@@ -12,7 +12,7 @@ export default function ScreenName() {
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#F1103D',
backgroundColor: '#61A6AB',
alignItems: 'center',
justifyContent: 'center',
},
......
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