Actually, the reset button is only a sign as the user will be able to tap not only on the button but anywhere on the screen to get the game started. In any case, we will position this button properly on every screen using the H
and W
constants:
/*** src/components/StartAgain.js ***/ import React, { Component } from "react"; import { Text, View, StyleSheet, TouchableOpacity, Image } from "react-native"; import { W, H } from "../constants"; export default class StartAgain extends Component { render() { return ( <Image style={{ position: "absolute", left: 35 * W, top: 40 * H }} resizeMode="contain" source={require("../../images/reset.png")} /> ); } }