<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MatchActivity"
    android:orientation="vertical">

    <include layout="@layout/my_toolbar"/>

        <TableLayout
            android:id="@+id/match_header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/my_toolbar"
            android:shrinkColumns="1"
            android:stretchColumns="0, 2"
            android:layout_gravity="center_horizontal"
            android:layout_margin="0dp"
            android:paddingBottom="8dp"
            android:background="@drawable/textview_underline"
            >

            <TableRow
                android:padding="0dp"
                android:layout_margin="0dp">

                <TextView
                    android:id="@+id/team_one_id"
                    android:layout_width="0dp"
                    style="@style/TitleTextStyle"
                    android:gravity="left"
                    android:layout_weight="4"
                    android:text="@string/team_one_title"
                    android:singleLine="true"
                    android:layout_margin="0dp"
                    />

                <TextView
                    android:layout_width="wrap_content"
                    style="@style/TitleTextStyle"
                    android:textStyle="normal"
                    android:gravity="center"
                    android:layout_weight="0"
                    android:layout_margin="0dp"
                    android:paddingLeft="4dp"
                    android:paddingRight="4dp"
                    />

                <TextView
                    android:id="@+id/team_two_id"
                    android:layout_width="0dp"
                    style="@style/TitleTextStyle"
                    android:gravity="right"
                    android:layout_weight="4"
                    android:text="@string/team_two_title"
                    android:singleLine="true"
                    android:layout_margin="0dp"
                    />

            </TableRow>

            <TableRow
                android:padding="0dp"
                android:layout_margin="0dp">

                <TextView
                    android:id="@+id/team_one_wins"
                    android:layout_width="0dp"
                    style="@style/TitleTextStyle"
                    android:gravity="right"
                    android:layout_weight="4"
                    android:text="10"
                    android:singleLine="true"
                    android:layout_margin="0dp"
                    android:padding="0dp"
                    />

                <TextView
                    android:layout_width="wrap_content"
                    style="@style/TitleTextStyle"
                    android:textStyle="normal"
                    android:gravity="bottom|center_horizontal"
                    android:layout_weight="0"
                    android:text=":"
                    android:layout_margin="0dp"
                    android:padding="0dp"
                    />

                <TextView
                    android:id="@+id/team_two_wins"
                    android:layout_width="0dp"
                    style="@style/TitleTextStyle"
                    android:gravity="left"
                    android:layout_weight="4"
                    android:text="2"
                    android:singleLine="true"
                    android:layout_margin="0dp"
                    android:padding="0dp"
                    />
            </TableRow>

        </TableLayout>

    <Button
        android:id="@+id/new_game_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:text="@string/new_game_button"
        android:onClick="newGame"
        android:layout_margin="4dp"
        />

    <!--<TextView-->
        <!--style = "@style/MainTextStyle"-->
        <!--android:text="@string/list_of_games"-->
        <!--android:background="@drawable/textview_underline"-->
        <!--android:layout_margin="0dp"-->
        <!--/>-->

    <ListView
        android:id="@+id/game_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/match_header"
        android:layout_above="@id/new_game_button"
        />

    <!--View to show if the list is empty-->
    <TextView android:id="@android:id/empty"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/match_header"
        android:gravity="center_horizontal"
        android:text="@string/no_games" />

</RelativeLayout>
