activity_flood_grid.xml 3.23 KB
Newer Older
Christopher League's avatar
Christopher League committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    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">

    <android.support.v7.widget.GridLayout
        android:id="@+id/grid"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:padding="10dp"
        app:columnCount="2"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0">

        <View
            android:id="@+id/sample1"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimary"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />

        <View
            android:id="@+id/sample2"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorAccent"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />

        <View
            android:id="@+id/sample3"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimaryDark"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />

        <View
            android:id="@+id/sample4"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimary"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />
    </android.support.v7.widget.GridLayout>

    <LinearLayout
        android:id="@+id/buttonBar"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginTop="8dp"
        android:layout_marginRight="24dp"
        android:layout_marginBottom="8dp"
        android:orientation="vertical"
        android:padding="@dimen/default_gap"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

    </LinearLayout>

    <TextView
        android:id="@+id/num_moves"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="8dp"
        android:gravity="center_horizontal"
        android:maxLines="2"
        android:scrollHorizontally="false"
        android:text="numMoves"
        android:textSize="30sp"
        app:fontFamily="sans-serif-black"
        app:layout_constraintBottom_toTopOf="@+id/buttonBar"
        app:layout_constraintEnd_toStartOf="@+id/buttonBar"
        app:layout_constraintStart_toEndOf="@+id/grid"
        app:layout_constraintTop_toBottomOf="@+id/grid" />

</android.support.constraint.ConstraintLayout>