activity_main.xml 7.62 KB
Newer Older
Christopher League's avatar
Christopher League committed
1
<?xml version="1.0" encoding="utf-8"?>
2
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Christopher League's avatar
Christopher League committed
3
4
5
6
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
7
8
    android:orientation="vertical"
    android:padding="@dimen/default_gap"
Christopher League's avatar
Christopher League committed
9
10
11
    tools:context=".MainActivity">

    <TextView
12
13
        android:id="@+id/title"
        android:layout_width="match_parent"
Christopher League's avatar
Christopher League committed
14
        android:layout_height="wrap_content"
15
16
17
        android:layout_marginTop="24dp"
        android:gravity="center"
        android:text="@string/title"
18
        android:textSize="54sp"
19
20
        android:textStyle="bold"
        app:fontFamily="casual"
Christopher League's avatar
Christopher League committed
21
22
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
23
        app:layout_constraintTop_toTopOf="parent" />
24

25
26
27
28
29
30
31
    <TextView
        android:id="@+id/textView9"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="\u00A92019 Christopher League" />

32
33
    <Space
        android:layout_width="match_parent"
34
        android:layout_height="wrap_content"
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
        android:layout_weight="1" />

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.3"
        android:padding="@dimen/default_gap">

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="fill_horizontal|center_vertical"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/boardSizeLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingRight="@dimen/default_gap"
                android:text="Board Size"
                android:textSize="18sp"
                app:fontFamily="sans-serif-medium" />

            <TextView
                android:id="@+id/boardSizeValue"
                android:layout_width="40dp"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:text="99"
                android:textSize="18sp"
                app:fontFamily="sans-serif-medium" />

            <SeekBar
                android:id="@+id/boardSizeSlider"
                style="@style/Widget.AppCompat.SeekBar.Discrete"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:max="3"
                android:progress="0" />
        </TableRow>

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center_vertical">

            <TextView
                android:id="@+id/numColorsLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:paddingRight="@dimen/default_gap"
                android:text="Colors"
                android:textSize="18sp"
                app:fontFamily="sans-serif-medium" />

            <TextView
                android:id="@+id/numColorsValue"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:text="9"
                android:textSize="18sp"
                app:fontFamily="sans-serif-medium" />

            <SeekBar
                android:id="@+id/numColorsSlider"
                style="@style/Widget.AppCompat.SeekBar.Discrete"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:max="5"
                android:progress="3" />

        </TableRow>

        <TableRow
            android:layout_width="match_parent"
116
            android:layout_height="wrap_content"
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
            android:layout_weight="1"
            android:gravity="center_vertical">

            <TextView
                android:id="@+id/paletteLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:paddingRight="@dimen/default_gap"
                android:text="Palette"
                android:textSize="18sp"
                app:fontFamily="sans-serif-medium" />

            <RadioButton
                android:id="@+id/radioPalette1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:gravity="right"
                android:textSize="8sp" />

            <edu.liu.floodgame.PaletteSwatchesView
                android:id="@+id/swatchesPalette1"
                android:layout_width="match_parent"
                android:layout_height="@dimen/color_button"
                android:layout_weight="1" />

        </TableRow>

        <TableRow
            android:layout_width="match_parent"
148
149
            android:layout_height="wrap_content"
            android:layout_weight="1"
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
            android:gravity="center_vertical">

            <View
                android:layout_width="0dp"
                android:layout_height="0dp" />

            <RadioButton
                android:id="@+id/radioPalette2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="false"
                android:gravity="right"
                android:textSize="8sp" />

            <edu.liu.floodgame.PaletteSwatchesView
                android:id="@+id/swatchesPalette2"
                android:layout_width="match_parent"
                android:layout_height="@dimen/color_button"
                android:layout_weight="1" />

        </TableRow>
171

172
173
        <TableRow
            android:layout_width="match_parent"
174
175
            android:layout_height="wrap_content"
            android:layout_weight="1"
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
            android:gravity="center_vertical">

            <View
                android:layout_width="0dp"
                android:layout_height="0dp" />

            <RadioButton
                android:id="@+id/radioPalette3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="false"
                android:gravity="right"
                android:textSize="8sp" />


            <edu.liu.floodgame.PaletteSwatchesView
                android:id="@+id/swatchesPalette3"
                android:layout_width="match_parent"
                android:layout_height="@dimen/color_button"
                android:layout_weight="1" />

        </TableRow>

    </TableLayout>

    <Space
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1" />
205

206
207
208
209
210
211
212
213
214
215
216
217
218
    <ImageButton
        android:id="@+id/imageButton"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_gravity="center"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="8dp"
        android:onClick="clickStartGame"
        android:scaleType="centerInside"
        app:srcCompat="@android:drawable/ic_media_play" />
Christopher League's avatar
Christopher League committed
219

220
</LinearLayout>