summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/res/layout/config_detail_fragment.xml
blob: 1bae0450424d21c90d501f50b02b084864880fbf (plain)
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
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">

    <data>

        <variable
            name="config"
            type="com.wireguard.config.Config" />
    </data>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp">

            <TextView
                android:id="@+id/config_name_label"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:labelFor="@+id/config_name_text"
                android:text="@string/config_name" />

            <TextView
                android:id="@+id/config_name_text"
                style="?android:attr/textAppearanceMedium"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/config_name_label"
                android:text="@{config.name}" />

            <TextView
                android:id="@+id/public_key_label"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/config_name_text"
                android:labelFor="@+id/public_key_text"
                android:text="@string/public_key" />

            <TextView
                android:id="@+id/public_key_text"
                style="?android:attr/textAppearanceMedium"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/public_key_label"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@{config.interface.publicKey}" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/public_key_text"
                android:text="@{config.toString()}" />
        </RelativeLayout>
    </ScrollView>
</layout>