aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorpacien2018-08-21 02:09:57 +0200
committerpacien2018-08-21 02:09:57 +0200
commit4629e909c9f8dd6fdc7ec9ed1dcc4668311e134f (patch)
treea9346c8358e9bc0868b60a5379260c6e53449286 /app/src/main/res
parent4702b7441b65173a1e0c7f0b560e672d06ee4e4d (diff)
downloadtincapp-4629e909c9f8dd6fdc7ec9ed1dcc4668311e134f.tar.gz
Add subnet list tab to status activity
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/status_node_list_fragment.xml (renamed from app/src/main/res/layout/status_node_list.xml)1
-rw-r--r--app/src/main/res/layout/status_subnet_list_fragment.xml38
-rw-r--r--app/src/main/res/layout/status_subnet_list_item.xml50
-rw-r--r--app/src/main/res/values/strings.xml4
-rw-r--r--app/src/main/res/values/styles.xml1
5 files changed, 92 insertions, 2 deletions
diff --git a/app/src/main/res/layout/status_node_list.xml b/app/src/main/res/layout/status_node_list_fragment.xml
index 923d20e..fd000bb 100644
--- a/app/src/main/res/layout/status_node_list.xml
+++ b/app/src/main/res/layout/status_node_list_fragment.xml
@@ -20,7 +20,6 @@
20 20
21<LinearLayout 21<LinearLayout
22 xmlns:android="http://schemas.android.com/apk/res/android" 22 xmlns:android="http://schemas.android.com/apk/res/android"
23 android:id="@+id/status_node_list_wrapper"
24 android:layout_width="match_parent" 23 android:layout_width="match_parent"
25 android:layout_height="match_parent" 24 android:layout_height="match_parent"
26 android:orientation="vertical"> 25 android:orientation="vertical">
diff --git a/app/src/main/res/layout/status_subnet_list_fragment.xml b/app/src/main/res/layout/status_subnet_list_fragment.xml
new file mode 100644
index 0000000..1470bad
--- /dev/null
+++ b/app/src/main/res/layout/status_subnet_list_fragment.xml
@@ -0,0 +1,38 @@
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<LinearLayout
22 xmlns:android="http://schemas.android.com/apk/res/android"
23 android:layout_width="match_parent"
24 android:layout_height="match_parent"
25 android:orientation="vertical">
26
27 <ListView
28 android:id="@+id/status_subnet_list"
29 android:layout_width="match_parent"
30 android:layout_height="match_parent"
31 android:divider="@drawable/horizontal_line"/>
32
33 <TextView
34 android:id="@+id/status_subnet_list_placeholder"
35 style="@style/AppTheme.ListBlock.Placeholder"
36 android:text="@string/status_subnet_list_empty_placeholder_text"/>
37
38</LinearLayout>
diff --git a/app/src/main/res/layout/status_subnet_list_item.xml b/app/src/main/res/layout/status_subnet_list_item.xml
new file mode 100644
index 0000000..8f8e2c4
--- /dev/null
+++ b/app/src/main/res/layout/status_subnet_list_item.xml
@@ -0,0 +1,50 @@
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 <variable
26 name="subnetInfo"
27 type="org.pacien.tincapp.activities.status.subnets.SubnetInfo"/>
28
29 </data>
30
31 <LinearLayout
32 style="@style/AppTheme.ListBlock"
33 android:layout_width="match_parent"
34 android:layout_height="wrap_content"
35 android:orientation="horizontal">
36
37 <TextView
38 style="@style/AppTheme.BlockTitle"
39 android:layout_weight="1"
40 android:text="@{subnetInfo.ipRange}"/>
41
42 <TextView
43 android:layout_width="wrap_content"
44 android:layout_height="wrap_content"
45 android:layout_weight="0"
46 android:text="@{subnetInfo.owner}"/>
47
48 </LinearLayout>
49
50</layout>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3f2e800..827e996 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -115,8 +115,9 @@
115 115
116 <!-- Status activity --> 116 <!-- Status activity -->
117 <string name="status_activity_state_connected_to_format">Connected to %s</string> 117 <string name="status_activity_state_connected_to_format">Connected to %s</string>
118 <string name="status_activity_title_node_list">Nodes</string>
119 <string name="status_activity_title_network_info">Network</string> 118 <string name="status_activity_title_network_info">Network</string>
119 <string name="status_activity_title_node_list">Nodes</string>
120 <string name="status_activity_title_subnet_list">Subnets</string>
120 121
121 <string name="status_network_info_network_name_label">Network name</string> 122 <string name="status_network_info_network_name_label">Network name</string>
122 <string name="status_network_info_ip_addresses_label">IP addresses</string> 123 <string name="status_network_info_ip_addresses_label">IP addresses</string>
@@ -140,6 +141,7 @@
140 <string name="status_node_info_modal_placeholder_text">Loading…</string> 141 <string name="status_node_info_modal_placeholder_text">Loading…</string>
141 <string name="status_node_info_dialog_title">Node info</string> 142 <string name="status_node_info_dialog_title">Node info</string>
142 <string name="status_node_info_dialog_close_action">Close</string> 143 <string name="status_node_info_dialog_close_action">Close</string>
144 <string name="status_subnet_list_empty_placeholder_text">Loading…</string>
143 145
144 <!-- Log viewer activity --> 146 <!-- Log viewer activity -->
145 <string name="log_view_state_level_format">Log level: %s</string> 147 <string name="log_view_state_level_format">Log level: %s</string>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 813b040..fc4a6c3 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -60,6 +60,7 @@
60 <item name="android:paddingRight">@dimen/activity_horizontal_margin</item> 60 <item name="android:paddingRight">@dimen/activity_horizontal_margin</item>
61 <item name="android:paddingTop">@dimen/activity_vertical_margin</item> 61 <item name="android:paddingTop">@dimen/activity_vertical_margin</item>
62 <item name="android:orientation">vertical</item> 62 <item name="android:orientation">vertical</item>
63 <item name="android:focusable">true</item>
63 </style> 64 </style>
64 65
65 <style name="AppTheme.ListBlock.Clickable"> 66 <style name="AppTheme.ListBlock.Clickable">