|
8 | 8 | android:orientation="vertical"
|
9 | 9 | tools:context="com.example.ravina.tictactoe.TicTacToeActivity">
|
10 | 10 |
|
11 |
| - <GridView |
| 11 | + <GridLayout |
12 | 12 | android:id="@+id/board"
|
13 |
| - android:layout_width="match_parent" |
| 13 | + android:layout_width="wrap_content" |
14 | 14 | android:layout_height="wrap_content"
|
15 |
| - android:layout_alignParentBottom="true" |
16 |
| - android:layout_alignParentLeft="true" |
17 |
| - android:layout_alignParentStart="true" |
18 |
| - android:layout_marginBottom="314dp" |
19 |
| - android:columnWidth="100dp" |
20 |
| - android:gravity="center" |
21 |
| - android:horizontalSpacing="0dp" |
22 |
| - android:numColumns="3" |
23 |
| - android:outlineProvider="bounds" |
24 |
| - android:verticalSpacing="0dp" |
25 |
| - > |
| 15 | + android:layout_alignParentTop="true" |
| 16 | + android:layout_centerHorizontal="true" |
| 17 | + android:layout_marginTop="18dp" |
| 18 | + android:alignmentMode="alignMargins" |
| 19 | + android:columnCount="3" |
| 20 | + android:padding="14dp" |
| 21 | + android:rowCount="3"> |
26 | 22 |
|
| 23 | + <ImageView |
| 24 | + android:id="@+id/sOne" |
| 25 | + android:layout_width="100dp" |
| 26 | + android:layout_height="100dp" |
| 27 | + android:onClick="makeMove"/> |
27 | 28 |
|
28 |
| - </GridView> |
29 |
| - <ImageView |
30 |
| - android:layout_width="100dp" |
31 |
| - android:layout_height="100dp" |
32 |
| - android:id="@+id/sOne" /> |
| 29 | + <ImageView |
| 30 | + android:id="@+id/sTwo" |
| 31 | + android:layout_width="100dp" |
| 32 | + android:layout_height="100dp" |
| 33 | + android:onClick="makeMove"/> |
33 | 34 |
|
34 |
| - <ImageView |
35 |
| - android:layout_width="100dp" |
36 |
| - android:layout_height="100dp" |
37 |
| - android:id="@+id/sTwo" /> |
| 35 | + <ImageView |
| 36 | + android:id="@+id/sThree" |
| 37 | + android:layout_width="100dp" |
| 38 | + android:layout_height="100dp" |
| 39 | + android:onClick="makeMove"/> |
38 | 40 |
|
39 |
| - <ImageView |
40 |
| - android:layout_width="100dp" |
41 |
| - android:layout_height="100dp" |
42 |
| - android:id="@+id/sThree" /> |
| 41 | + <ImageView |
| 42 | + android:id="@+id/sFour" |
| 43 | + android:layout_width="100dp" |
| 44 | + android:layout_height="100dp" |
| 45 | + android:onClick="makeMove"/> |
43 | 46 |
|
44 |
| - <ImageView |
45 |
| - android:layout_width="100dp" |
46 |
| - android:layout_height="100dp" |
47 |
| - android:id="@+id/sFour" /> |
| 47 | + <ImageView |
| 48 | + android:id="@+id/sFive" |
| 49 | + android:layout_width="100dp" |
| 50 | + android:layout_height="100dp" |
| 51 | + android:onClick="makeMove"/> |
48 | 52 |
|
49 |
| - <ImageView |
50 |
| - android:layout_width="100dp" |
51 |
| - android:layout_height="100dp" |
52 |
| - android:id="@+id/sFive" /> |
| 53 | + <ImageView |
| 54 | + android:id="@+id/sSix" |
| 55 | + android:layout_width="100dp" |
| 56 | + android:layout_height="100dp" |
| 57 | + android:onClick="makeMove"/> |
53 | 58 |
|
54 |
| - <ImageView |
55 |
| - android:layout_width="100dp" |
56 |
| - android:layout_height="100dp" |
57 |
| - android:id="@+id/sSix" /> |
| 59 | + <ImageView |
| 60 | + android:id="@+id/sSeven" |
| 61 | + android:layout_width="100dp" |
| 62 | + android:layout_height="100dp" |
| 63 | + android:onClick="makeMove"/> |
58 | 64 |
|
59 |
| - <ImageView |
60 |
| - android:layout_width="100dp" |
61 |
| - android:layout_height="100dp" |
62 |
| - android:id="@+id/sSeven" /> |
| 65 | + <ImageView |
| 66 | + android:id="@+id/sEight" |
| 67 | + android:layout_width="100dp" |
| 68 | + android:layout_height="100dp" |
| 69 | + android:onClick="makeMove"/> |
63 | 70 |
|
64 |
| - <ImageView |
65 |
| - android:layout_width="100dp" |
66 |
| - android:layout_height="100dp" |
67 |
| - android:id="@+id/sEight" /> |
| 71 | + <ImageView |
| 72 | + android:id="@+id/sNine" |
| 73 | + android:layout_width="100dp" |
| 74 | + android:layout_height="100dp" |
| 75 | + android:onClick="makeMove"/> |
| 76 | + |
| 77 | + </GridLayout> |
68 | 78 |
|
69 |
| - <ImageView |
70 |
| - android:layout_width="100dp" |
71 |
| - android:layout_height="100dp" |
72 |
| - android:id="@+id/sNine" /> |
73 | 79 |
|
74 | 80 |
|
75 | 81 |
|
|
0 commit comments