activity_flood_grid.xml 3.34 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
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
    </android.support.v7.widget.GridLayout>

    <LinearLayout
        android:id="@+id/buttonBar"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:background="#ccc"
        android:orientation="horizontal"
        android:padding="10dp"
        android:paddingRight="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/grid">

        <Button
            android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="#eea1c7"
            tools:layout_conversion_absoluteHeight="48dp"
            tools:layout_conversion_absoluteWidth="162dp"
            tools:layout_editor_absoluteX="10dp"
            tools:layout_editor_absoluteY="546dp" />

        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Button"
            tools:layout_conversion_absoluteHeight="48dp"
            tools:layout_conversion_absoluteWidth="230dp"
            tools:layout_editor_absoluteX="172dp"
            tools:layout_editor_absoluteY="546dp" />
    </LinearLayout>

</android.support.constraint.ConstraintLayout>