<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.niall.connect3.MainActivity">

    <GridLayout
        android:layout_width="match_parent"
        android:layout_height="360dp"
        android:rowCount="4"
        android:columnCount="4"
        android:background="@drawable/board"
        android:layout_centerInParent="true"
        android:id="@+id/gridLayout">

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter0"
            android:layout_row="0"
            android:layout_column="0"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="0"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter1"
            android:layout_row="0"
            android:layout_column="1"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="25dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="1"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter2"
            android:layout_row="0"
            android:layout_column="2"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="15dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="2"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter3"
            android:layout_row="1"
            android:layout_column="0"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="3"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter4"
            android:layout_row="1"
            android:layout_column="1"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="25dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="4"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter5"
            android:layout_row="1"
            android:layout_column="2"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="5"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter6"
            android:layout_row="2"
            android:layout_column="0"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="6"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter7"
            android:layout_row="2"
            android:layout_column="1"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="25dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="7"/>

        <ImageView
            android:layout_width="90dp"
            android:layout_height="90dp"
            android:id="@+id/counter8"
            android:layout_row="2"
            android:layout_column="2"
            android:src="@drawable/red"
            android:layout_margin="10dp"
            android:layout_marginLeft="15dp"
            android:layout_marginTop="20dp"
            android:alpha="0"
            android:onClick="placeCounter"
            android:tag="8"/>
    </GridLayout>

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:id="@+id/playAgainLayout">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/playAgainText"
            android:textSize="22dp"
            android:layout_gravity="center" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="OK"
            android:id="@+id/button"
            android:layout_gravity="center"
            android:textSize="18dp"
            android:onClick="playAgainButtonClick" />

    </LinearLayout>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/scoreText"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:textSize="22dp"
        android:textColor="#000000" />

</RelativeLayout>
