activity_flood_grid.xml 3.2 KB
Newer Older
1
2
3
4
5
6
7
8
9
<?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"
10
11
12
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:padding="10dp"
13
14
        app:columnCount="2"
        app:layout_constraintBottom_toBottomOf="parent"
15
        app:layout_constraintDimensionRatio="1"
16
        app:layout_constraintEnd_toEndOf="parent"
17
        app:layout_constraintHorizontal_bias="0.498"
18
        app:layout_constraintStart_toStartOf="parent"
19
20
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0">
21
22
23

        <View
            android:id="@+id/sample1"
24
25
26
27
28
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimary"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />
29
30
31

        <View
            android:id="@+id/sample2"
32
33
34
35
36
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorAccent"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />
37
38
39

        <View
            android:id="@+id/sample3"
40
41
42
43
44
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimaryDark"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />
45
46
47

        <View
            android:id="@+id/sample4"
48
49
50
51
52
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@color/colorPrimary"
            app:layout_columnWeight="1"
            app:layout_rowWeight="1" />
53
54
55
56
    </android.support.v7.widget.GridLayout>

    <LinearLayout
        android:id="@+id/buttonBar"
57
        android:layout_width="match_parent"
58
        android:layout_height="wrap_content"
59
        android:layout_marginBottom="24dp"
60
        android:orientation="horizontal"
61
        android:padding="@dimen/default_gap"
62
63
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
64
65
        app:layout_constraintStart_toStartOf="parent">

Christopher League's avatar
Christopher League committed
66
        <include layout="@layout/color_buttons"/>
67

68
69
    </LinearLayout>

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    <TextView
        android:id="@+id/num_moves"
        android:layout_width="wrap_content"
        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:text="numMoves"
        android:textSize="30sp"
        app:fontFamily="sans-serif-black"
        app:layout_constraintBottom_toTopOf="@+id/buttonBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/grid"
        app:layout_constraintVertical_bias="0.341" />

88
</android.support.constraint.ConstraintLayout>