aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/res/layout/tunnel_list_fragment.xml
blob: 3dc7fa0c8a6d854a5c3528a3199f2e809fb51dd4 (plain) (blame)
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
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <import type="com.wireguard.android.model.Tunnel" />

        <variable
            name="fragment"
            type="com.wireguard.android.fragment.TunnelListFragment" />

        <variable
            name="tunnels"
            type="com.wireguard.android.util.ObservableKeyedList&lt;String, Tunnel&gt;" />
    </data>

    <android.support.design.widget.CoordinatorLayout
        android:id="@+id/main_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?android:attr/colorBackground">

        <ListView
            android:id="@+id/tunnel_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:choiceMode="multipleChoiceModal"
            app:items="@{tunnels}"
            app:layout="@{@layout/tunnel_list_item}" />

        <com.getbase.floatingactionbutton.FloatingActionsMenu
            android:id="@+id/create_menu"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="8dp"
            app:fab_addButtonColorNormal="@color/wireguard_brand_red"
            app:fab_addButtonColorPressed="@color/wireguard_brand_red"
            app:fab_labelStyle="@style/fab_label"
            app:fab_labelsPosition="left"
            app:layout_dodgeInsetEdges="bottom">

            <com.getbase.floatingactionbutton.FloatingActionButton
                android:id="@+id/create_empty"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:onClick="@{fragment::onRequestCreateConfig}"
                app:fab_colorNormal="@color/wireguard_brand_red"
                app:fab_colorPressed="@color/wireguard_brand_red"
                app:fab_icon="@drawable/ic_action_edit"
                app:fab_size="mini"
                app:fab_title="@string/create_empty" />

            <com.getbase.floatingactionbutton.FloatingActionButton
                android:id="@+id/create_from_file"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:onClick="@{fragment::onRequestImportConfig}"
                app:fab_colorNormal="@color/wireguard_brand_red"
                app:fab_colorPressed="@color/wireguard_brand_red"
                app:fab_icon="@drawable/ic_action_open"
                app:fab_size="mini"
                app:fab_title="@string/create_from_file" />
        </com.getbase.floatingactionbutton.FloatingActionsMenu>
    </android.support.design.widget.CoordinatorLayout>
</layout>