Commit bf8373d3 authored by W.D.R.P. Sandeepa's avatar W.D.R.P. Sandeepa

Merge branch 'it18218640' into 'master'

add color result interface

See merge request !125
parents 058c88c0 98015d74
import axios from 'axios';
export default axios.create({ baseURL: 'http://192.168.8.101:5000/predict',timeout: 15000, });
\ No newline at end of file
export default axios.create({ baseURL: 'http://192.168.8.100:5000/',timeout: 15000, });
\ No newline at end of file
import React, { useEffect, useState } from "react";
import { StyleSheet, View, Text, Pressable, ImageBackground, TouchableOpacity, Image } from 'react-native';
import { StyleSheet, View, Text, Pressable, ImageBackground, TouchableOpacity, Image, StatusBar } from 'react-native';
import { SafeAreaView } from "react-native-safe-area-context";
import Orientation from 'react-native-orientation-locker';
import { useNavigation } from "@react-navigation/native";
import BackButton from "../../component/BackButton";
import TableList from "../../component/TableList";
import axios from "axios";
const webUrel = "http://192.168.8.100:5000/getColorActivitiesResult";
export default function ColorResult() {
const navigation = useNavigation();
function getColorResult() {
axios
.get(webUrel)
.then((response) => {
// setNames(response.data);
console.log(response.data);
})
.catch((err) => {
console.log(err);
});
}
React.useEffect(() => {
StatusBar.setHidden(true);
getColorResult();
const unsubscribe = navigation.addListener("focus", () => {
// The screen is focused
// Call any action
......@@ -23,23 +45,44 @@ export default function ColorResult() {
}, [navigation]);
return (
<SafeAreaView>
<SafeAreaView style={{ marginBottom: -150 }}>
<ScrollView>
<View>
<ImageBackground style={styles.image} source={require("../../assets/result/2.jpg")}>
<BackButton path="Home"/>
<ImageBackground style={styles.image} source={require("../../assets/result/21.jpg")}>
<View>
<BackButton path="Home" />
</View>
<View style={styles.container}>
<Image
style={styles.logo}
source={require("../../assets/result/title.png")}
/>
</View>
<View style={{ marginTop: -90 }}>
<TableList />
</View>
</ImageBackground>
</View>
</ScrollView >
</SafeAreaView>
)
}
const styles = StyleSheet.create({
body: {
flex: 1,
},
image: {
width: "100%",
height: "100%",
},
container: {
// backgroundColor : '#fff',
marginTop: -220,
justifyContent: 'center',
alignItems: 'center',
},
logo: {
marginTop: 80,
width: "30%",
height: "30%",
},
})
\ No newline at end of file
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