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

Merge branch 'it18218640' into 'master'

change single color activity

See merge request !102
parents 11d28b15 7f532c84
......@@ -10,7 +10,7 @@ export default function ColorActivity(props){
const navigation = useNavigation();
return(
<TouchableOpacity onPress={()=> {navigation.navigate("Blue")}}
<TouchableOpacity onPress={()=> {navigation.navigate("Blue", {color})}}
style={{
borderWidth: 5,
borderColor: color,
......
......@@ -18,9 +18,10 @@ import {
Image
} from 'react-native'
export default function Blue() {
export default function Blue(color) {
const navigation = useNavigation();
const backColor = color.route.params.color;
React.useEffect(() => {
const unsubscribe = navigation.addListener("focus", () => {
......@@ -52,7 +53,7 @@ export default function Blue() {
<Image style={styles.blackboard} source={require("../../assets/game/blackboard.png")}></Image>
<View style={styles.box}>
<View style={{width: 180, height: 180, backgroundColor: backColor, marginTop: -370, marginLeft: 455, borderRadius: 100}}>
</View>
</View>
......@@ -77,16 +78,6 @@ const styles = StyleSheet.create({
width: "100%",
height: "100%",
},
box: {
width: 180,
height: 180,
// borderColor: "#000000",
backgroundColor: "red",
marginTop: -370,
marginLeft: 455,
borderRadius: 100
},
blackboard: {
marginTop: -420,
marginLeft: 240,
......
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