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

Merge branch 'it18218640' into 'master'

It18218640

See merge request !170
parents bda0abe1 f6d496d8
...@@ -8,7 +8,7 @@ export default function ImageButton(props){ ...@@ -8,7 +8,7 @@ export default function ImageButton(props){
const {title, path} = props; const {title, path} = props;
return( 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> <Text style={styles.text}>{title}</Text>
</TouchableOpacity> </TouchableOpacity>
); );
......
...@@ -8,12 +8,22 @@ import ColorActivity from "../component/colorActivity"; ...@@ -8,12 +8,22 @@ import ColorActivity from "../component/colorActivity";
import client from "./client/Client"; import client from "./client/Client";
import AsyncStorage from '@react-native-async-storage/async-storage'; 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(); const navigation = useNavigation();
React.useEffect(() => { 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", () => { const unsubscribe = navigation.addListener("focus", () => {
Orientation.unlockAllOrientations(); Orientation.unlockAllOrientations();
Orientation.lockToPortrait(); Orientation.lockToPortrait();
......
This diff is collapsed.
...@@ -285,6 +285,48 @@ const styles = StyleSheet.create({ ...@@ -285,6 +285,48 @@ const styles = StyleSheet.create({
marginRight: 50, marginRight: 50,
color: "#000000", color: "#000000",
marginLeft: 50, 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 ...@@ -5,14 +5,14 @@ import { Text, TouchableOpacity, StyleSheet, View, Image, SafeAreaView, ScrollVi
import ColorActivity from "../../component/colorActivity"; import ColorActivity from "../../component/colorActivity";
import client from "../client/Client"; import client from "../client/Client";
export default function PrimaryType(title) { export default function PrimaryType({navigation}) {
// const { id, title } = props; // const { id, title } = props;
const title1 = title.route.params.title; // const title1 = title.route.params.title;
const id = title.route.params.id; // const id = title.route.params.id;
const navigation = useNavigation(); // const navigation = useNavigation();
const [names, setNames] = useState([]); const [names, setNames] = useState([]);
...@@ -52,7 +52,7 @@ export default function PrimaryType(title) { ...@@ -52,7 +52,7 @@ export default function PrimaryType(title) {
<View> <View>
<ImageBackground source={require("../../assets/color/background.png")} <ImageBackground source={require("../../assets/color/background.png")}
style={styles.image}> style={styles.image}>
<Text style={styles.title}>{title1}</Text> <Text style={styles.title}>Primary Activities</Text>
</ImageBackground> </ImageBackground>
</View> </View>
</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