<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

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

        <TextView
            android:id="@+id/dealer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_margin="0dp"
            android:padding="6dp"
            style="@style/TitleTextStyle"
            android:text="Dealer: Dealer Name"
            android:background="@drawable/textview_underline"
        />

        <TableLayout
            android:id="@+id/bidder_table"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:background="@drawable/textview_underline">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginBottom="0dp"
                >

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    android:layout_weight="3"
                    android:paddingLeft="4dp"
                    android:paddingBottom="0dp"
                    >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:gravity="bottom|left"
                        style="@style/TricksAndSCTextStyle"
                        android:text="Initial Score:"
                        />
                    <TextView
                        android:id="@+id/team_one_initial_score"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="top|left"
                        android:padding="0dp"
                        android:layout_weight="1"
                        style="@style/TricksAndSCTextStyle"
                        android:text="+250"/>
                </LinearLayout>

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="4"
                    android:gravity="center"
                    android:layout_margin="2dp"
                    android:padding="0dp"
                    style="@style/TitleTextStyle"
                    android:text="@string/bidder_title" />

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:orientation="vertical"
                    android:layout_weight="3"
                    android:paddingRight="4dp"
                    >

                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:gravity="bottom|right"
                        style="@style/TricksAndSCTextStyle"
                        android:text="Initial Score:"
                        />

                    <TextView
                        android:id="@+id/team_two_initial_score"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="top|right"
                        android:layout_weight="1"
                        style="@style/TricksAndSCTextStyle"
                        android:text="+250"/>
                </LinearLayout>

            </LinearLayout>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="0dp"
                >

                <ToggleButton
                    android:id="@+id/player_one_button"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:onClick="onBidderClick"
                    android:textOn="Player One"
                    android:textOff="Player One"/>

                <ToggleButton
                    android:id="@+id/player_two_button"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:onClick="onBidderClick"
                    android:textOn="Player Two"
                    android:textOff="Player Two"/>

            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <ToggleButton
                    android:id="@+id/player_three_button"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:onClick="onBidderClick"
                    android:textOn="Player Three"
                    android:textOff="Player Three"/>

                <ToggleButton
                    android:id="@+id/player_four_button"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:onClick="onBidderClick"
                    android:textOn="Player Four"
                    android:textOff="Player Four"/>

            </TableRow>


        </TableLayout>

        <TableLayout
            android:id="@+id/bid_table"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/textview_underline"
            android:layout_gravity="center"
            android:shrinkColumns="*"
            android:stretchColumns="*"
            >

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:layout_margin="0dp"
                    style="@style/TitleTextStyle"
                    android:text="@string/bid"
                    />


            <TableRow
                android:id="@+id/six_bid_row">

                <ToggleButton
                    android:id="@+id/six_spades"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/six_spades"
                    android:textOff="@string/six_spades"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/six_clubs"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/six_clubs"
                    android:textOff="@string/six_clubs"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/six_diamonds"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/six_diamonds"
                    android:textOff="@string/six_diamonds"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/six_hearts"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/six_hearts"
                    android:textOff="@string/six_hearts"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/six_notrump"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/six_notrump"
                    android:textOff="@string/six_notrump"
                    android:onClick="onBidClick"
                    />
            </TableRow>

            <TableRow>
                <ToggleButton
                    android:id="@+id/seven_spades"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/seven_spades"
                    android:textOff="@string/seven_spades"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/seven_clubs"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/seven_clubs"
                    android:textOff="@string/seven_clubs"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/seven_diamonds"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/seven_diamonds"
                    android:textOff="@string/seven_diamonds"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/seven_hearts"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/seven_hearts"
                    android:textOff="@string/seven_hearts"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/seven_notrump"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/seven_notrump"
                    android:textOff="@string/seven_notrump"
                    android:onClick="onBidClick"
                    />
            </TableRow>

            <TableRow>
                <ToggleButton
                    android:id="@+id/eight_spades"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/eight_spades"
                    android:textOff="@string/eight_spades"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/eight_clubs"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/eight_clubs"
                    android:textOff="@string/eight_clubs"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/eight_diamonds"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/eight_diamonds"
                    android:textOff="@string/eight_diamonds"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/eight_hearts"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/eight_hearts"
                    android:textOff="@string/eight_hearts"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/eight_notrump"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/eight_notrump"
                    android:textOff="@string/eight_notrump"
                    android:onClick="onBidClick"
                    />
            </TableRow>
            <TableRow>
                <ToggleButton
                    android:id="@+id/nine_spades"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/nine_spades"
                    android:textOff="@string/nine_spades"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/_clubs"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/nine_clubs"
                    android:textOff="@string/nine_clubs"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/nine_diamonds"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/nine_diamonds"
                    android:textOff="@string/nine_diamonds"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/nine_hearts"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/nine_hearts"
                    android:textOff="@string/nine_hearts"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/nine_notrump"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/nine_notrump"
                    android:textOff="@string/nine_notrump"
                    android:onClick="onBidClick"
                    />
            </TableRow>
            <TableRow>
                <ToggleButton
                    android:id="@+id/ten_spades"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/ten_spades"
                    android:textOff="@string/ten_spades"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/ten_clubs"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/ten_clubs"
                    android:textOff="@string/ten_clubs"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/ten_diamonds"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/ten_diamonds"
                    android:textOff="@string/ten_diamonds"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/ten_hearts"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textColor="#F44336"
                    android:textOn="@string/ten_hearts"
                    android:textOff="@string/ten_hearts"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/ten_notrump"
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:textOn="@string/ten_notrump"
                    android:textOff="@string/ten_notrump"
                    android:onClick="onBidClick"
                    />
            </TableRow>
            <TableRow>
                <ToggleButton
                    android:id="@+id/nullo"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="8"
                    android:textOn="@string/nullo"
                    android:textOff="@string/nullo"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/open_nullo"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="10"
                    android:textOn="@string/open_nullo"
                    android:textOff="@string/open_nullo"
                    android:onClick="onBidClick"
                    />
                <ToggleButton
                    android:id="@+id/double_nullo"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="12"
                    android:textOn="@string/double_nullo"
                    android:textOff="@string/double_nullo"
                    android:onClick="onBidClick"
                    />
            </TableRow>

        </TableLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_margin="0dp"
            style="@style/TitleTextStyle"
            android:text="@string/trick_for_each_team" />

        <TableLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <TextView
                    android:id="@+id/team_one_names"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:text="Team 1"
                    />
                <TextView
                    android:id="@+id/team_two_names"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:textColor="#F44336"
                    android:text="Team 2"
                    />
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <TextView
                    android:id="@+id/team_one_tricks"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:text="0"
                    />
                <TextView
                    android:id="@+id/team_two_tricks"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:textColor="#F44336"
                    android:text="0"
                    />
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingRight="20dp"
                android:paddingLeft="20dp">
                <SeekBar
                    android:id="@+id/seekbar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:max="10"
                    android:progressDrawable="@drawable/progress_drawable"
                    android:thumbOffset="9.5dp"
                    android:splitTrack="false"
                    android:progress="5"/>
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <TextView
                    android:id="@+id/team_one_points_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:text="@string/points_awarded"
                    />
                <TextView
                    android:id="@+id/team_two_points_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"
                    android:text="@string/points_awarded"
                    />
            </TableRow>

            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <TextView
                    android:id="@+id/team_one_score_change"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"/>
                <TextView
                    android:id="@+id/team_two_score_change"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:layout_weight="1"
                    style="@style/PointKeepingTextStyle"/>
            </TableRow>

        </TableLayout>

        <Button
            android:id="@+id/hand_ok_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="OK"
            android:onClick="onOkClick"
            />


    </LinearLayout>
</ScrollView>