diff options
author | pacien | 2018-08-11 01:54:04 +0200 |
---|---|---|
committer | pacien | 2018-08-11 01:54:04 +0200 |
commit | 3b353c4037f3c52710287777a17110dad6b9d720 (patch) | |
tree | 731c5f84bc68cc9268919d38960bec0241e06ec2 /app/src/main/res/layout/status_network_info_fragment.xml | |
parent | 1ff29ae86b441bc3d0f5eb75d0bdc76f92b7dabe (diff) | |
download | tincapp-3b353c4037f3c52710287777a17110dad6b9d720.tar.gz |
Refactor part of Status activity
Diffstat (limited to 'app/src/main/res/layout/status_network_info_fragment.xml')
-rw-r--r-- | app/src/main/res/layout/status_network_info_fragment.xml | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/app/src/main/res/layout/status_network_info_fragment.xml b/app/src/main/res/layout/status_network_info_fragment.xml new file mode 100644 index 0000000..8038180 --- /dev/null +++ b/app/src/main/res/layout/status_network_info_fragment.xml | |||
@@ -0,0 +1,145 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | |||
3 | <!-- | ||
4 | * Tinc App, an Android binding and user interface for the tinc mesh VPN daemon | ||
5 | * Copyright (C) 2017-2018 Pacien TRAN-GIRARD | ||
6 | * | ||
7 | * This program is free software: you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation, either version 3 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
19 | --> | ||
20 | |||
21 | <layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
22 | |||
23 | <data> | ||
24 | |||
25 | <import type="android.view.View"/> | ||
26 | |||
27 | <variable | ||
28 | name="netName" | ||
29 | type="String"/> | ||
30 | |||
31 | <variable | ||
32 | name="vpnInterfaceConfiguration" | ||
33 | type="org.pacien.tincapp.data.VpnInterfaceConfiguration"/> | ||
34 | |||
35 | <variable | ||
36 | name="listFormatter" | ||
37 | type="org.pacien.tincapp.activities.status.VpnInterfaceConfigurationFormatter"/> | ||
38 | |||
39 | </data> | ||
40 | |||
41 | <LinearLayout style="@style/AppTheme.List"> | ||
42 | |||
43 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
44 | |||
45 | <TextView | ||
46 | style="@style/AppTheme.BlockTitle" | ||
47 | android:text="@string/status_network_info_network_name_label"/> | ||
48 | |||
49 | <TextView | ||
50 | style="@style/AppTheme.BlockContent" | ||
51 | android:text="@{netName ?? @string/status_network_info_yes_value}"/> | ||
52 | |||
53 | </LinearLayout> | ||
54 | |||
55 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
56 | |||
57 | <TextView | ||
58 | style="@style/AppTheme.BlockTitle" | ||
59 | android:text="@string/status_network_info_ip_addresses_label"/> | ||
60 | |||
61 | <TextView | ||
62 | style="@style/AppTheme.BlockContent" | ||
63 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.addresses)}"/> | ||
64 | |||
65 | </LinearLayout> | ||
66 | |||
67 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
68 | |||
69 | <TextView | ||
70 | style="@style/AppTheme.BlockTitle" | ||
71 | android:text="@string/status_network_info_routes_label"/> | ||
72 | |||
73 | <TextView | ||
74 | style="@style/AppTheme.BlockContent" | ||
75 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.routes)}"/> | ||
76 | |||
77 | </LinearLayout> | ||
78 | |||
79 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
80 | |||
81 | <TextView | ||
82 | style="@style/AppTheme.BlockTitle" | ||
83 | android:text="@string/status_network_info_dns_servers_label"/> | ||
84 | |||
85 | <TextView | ||
86 | style="@style/AppTheme.BlockContent" | ||
87 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.dnsServers)}"/> | ||
88 | |||
89 | </LinearLayout> | ||
90 | |||
91 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
92 | |||
93 | <TextView | ||
94 | style="@style/AppTheme.BlockTitle" | ||
95 | android:text="@string/status_network_info_search_domains_label"/> | ||
96 | |||
97 | <TextView | ||
98 | style="@style/AppTheme.BlockContent" | ||
99 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.searchDomains)}"/> | ||
100 | |||
101 | </LinearLayout> | ||
102 | |||
103 | <LinearLayout | ||
104 | style="@style/AppTheme.ListBlock" | ||
105 | android:visibility="@{vpnInterfaceConfiguration.allowedApplications.isEmpty ? View.GONE : View.VISIBLE}"> | ||
106 | |||
107 | <TextView | ||
108 | style="@style/AppTheme.BlockTitle" | ||
109 | android:text="@string/status_network_info_allowed_applications_label"/> | ||
110 | |||
111 | <TextView | ||
112 | style="@style/AppTheme.BlockContent" | ||
113 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.allowedApplications)}"/> | ||
114 | |||
115 | </LinearLayout> | ||
116 | |||
117 | <LinearLayout | ||
118 | style="@style/AppTheme.ListBlock" | ||
119 | android:visibility="@{vpnInterfaceConfiguration.disallowedApplications.isEmpty ? View.GONE : View.VISIBLE}"> | ||
120 | |||
121 | <TextView | ||
122 | style="@style/AppTheme.BlockTitle" | ||
123 | android:text="@string/status_network_info_disallowed_applications_label"/> | ||
124 | |||
125 | <TextView | ||
126 | style="@style/AppTheme.BlockContent" | ||
127 | android:text="@{listFormatter.formatList(vpnInterfaceConfiguration.disallowedApplications)}"/> | ||
128 | |||
129 | </LinearLayout> | ||
130 | |||
131 | <LinearLayout style="@style/AppTheme.ListBlock"> | ||
132 | |||
133 | <TextView | ||
134 | style="@style/AppTheme.BlockTitle" | ||
135 | android:text="@string/status_network_info_allow_bypass_label"/> | ||
136 | |||
137 | <TextView | ||
138 | style="@style/AppTheme.BlockContent" | ||
139 | android:text="@{vpnInterfaceConfiguration.allowBypass ? @string/status_network_info_yes_value : @string/status_network_info_no_value}"/> | ||
140 | |||
141 | </LinearLayout> | ||
142 | |||
143 | </LinearLayout> | ||
144 | |||
145 | </layout> | ||