activity_flood_grid.xml 2.89 KB
Newer Older
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
<?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="wrap_content"
        android:layout_height="wrap_content"
        app:columnCount="2"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <View
            android:id="@+id/sample1"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:background="@color/colorPrimary" />

        <View
            android:id="@+id/sample2"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:background="@color/colorAccent" />

        <View
            android:id="@+id/sample3"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:background="@color/colorPrimaryDark" />

        <View
            android:id="@+id/sample4"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:background="@color/colorPrimary" />
    </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>