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

change interface

parent d6c8e846
......@@ -8,7 +8,7 @@ export default function ImageButton(props){
const {title, path} = props;
return(
<TouchableOpacity onPress={()=> {navigation.navigate(path)}} style={styles.ImageButton}>
<TouchableOpacity onPress={()=> {navigation.navigate(path, { type: 'primary'})}} style={styles.ImageButton}>
<Text style={styles.text}>{title}</Text>
</TouchableOpacity>
);
......
......@@ -7,7 +7,7 @@ import Home from '../screen/home';
import Start from '../screen/Start';
import Register from '../screen/auth/Register';
import Login from '../screen/auth/Login';
import Splash from '../screen/splash/splash';
import Splash from '../screen/splash/Splash';
import Color from '../screen/Color';
import Blue from '../screen/activity/Blue';
import Blue2 from '../screen/activity/Blue2';
......
......@@ -8,12 +8,22 @@ import ColorActivity from "../component/colorActivity";
import client from "./client/Client";
import AsyncStorage from '@react-native-async-storage/async-storage';
export default function Color() {
export default function Color(props) {
const [type, setType] = useState('');
const navigation = useNavigation();
React.useEffect(() => {
setType(props.route.params.type);
// const type2 = props.route.params.type2;
// console.log(props);
// console.log(type);
// console.log(type2);
const unsubscribe = navigation.addListener("focus", () => {
Orientation.unlockAllOrientations();
Orientation.lockToPortrait();
......
This diff is collapsed.
......@@ -285,6 +285,48 @@ const styles = StyleSheet.create({
marginRight: 50,
color: "#000000",
marginLeft: 50,
}
},
centeredView2: {
flex: 1,
justifyContent: "center",
alignItems: "center",
marginTop: 22
},
modalView2: {
margin: 20,
backgroundColor: "white",
borderRadius: 20,
padding: 35,
alignItems: "center",
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 2
},
shadowOpacity: 0.25,
shadowRadius: 4,
elevation: 5
},
button2: {
borderRadius: 20,
padding: 10,
elevation: 2
},
buttonOpen2: {
backgroundColor: "#F194FF",
},
buttonClose2: {
backgroundColor: "#2196F3",
},
textStyle2: {
color: "white",
fontWeight: "bold",
textAlign: "center"
},
modalText2: {
marginBottom: 15,
textAlign: "center"
}
})
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -5,14 +5,14 @@ import { Text, TouchableOpacity, StyleSheet, View, Image, SafeAreaView, ScrollVi
import ColorActivity from "../../component/colorActivity";
import client from "../client/Client";
export default function PrimaryType(title) {
export default function PrimaryType({navigation}) {
// const { id, title } = props;
const title1 = title.route.params.title;
const id = title.route.params.id;
// const title1 = title.route.params.title;
// const id = title.route.params.id;
const navigation = useNavigation();
// const navigation = useNavigation();
const [names, setNames] = useState([]);
......@@ -52,7 +52,7 @@ export default function PrimaryType(title) {
<View>
<ImageBackground source={require("../../assets/color/background.png")}
style={styles.image}>
<Text style={styles.title}>{title1}</Text>
<Text style={styles.title}>Primary Activities</Text>
</ImageBackground>
</View>
</View>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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