aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorpacien2018-08-21 01:35:06 +0200
committerpacien2018-08-21 01:35:06 +0200
commit4702b7441b65173a1e0c7f0b560e672d06ee4e4d (patch)
treea2f428073d4b9fb77edc3e539b3d6f118489e855 /app/src/main/res/layout
parentb321bbe07ff48d571feb4f81c66f58223584dc83 (diff)
downloadtincapp-4702b7441b65173a1e0c7f0b560e672d06ee4e4d.tar.gz
Show node reachability in node list
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/status_node_info_dialog.xml2
-rw-r--r--app/src/main/res/layout/status_node_list_item.xml42
2 files changed, 36 insertions, 8 deletions
diff --git a/app/src/main/res/layout/status_node_info_dialog.xml b/app/src/main/res/layout/status_node_info_dialog.xml
index 36f3e86..5216875 100644
--- a/app/src/main/res/layout/status_node_info_dialog.xml
+++ b/app/src/main/res/layout/status_node_info_dialog.xml
@@ -31,7 +31,7 @@
31 android:layout_width="match_parent" 31 android:layout_width="match_parent"
32 android:layout_height="wrap_content" 32 android:layout_height="wrap_content"
33 android:fontFamily="monospace" 33 android:fontFamily="monospace"
34 android:text="@string/status_node_list_modal_placeholder_text" 34 android:text="@string/status_node_info_modal_placeholder_text"
35 android:textColor="@color/textSecondary"/> 35 android:textColor="@color/textSecondary"/>
36 36
37</ScrollView> 37</ScrollView>
diff --git a/app/src/main/res/layout/status_node_list_item.xml b/app/src/main/res/layout/status_node_list_item.xml
index dd1a842..96dad8c 100644
--- a/app/src/main/res/layout/status_node_list_item.xml
+++ b/app/src/main/res/layout/status_node_list_item.xml
@@ -18,10 +18,38 @@
18 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19--> 19-->
20 20
21<TextView 21<layout xmlns:android="http://schemas.android.com/apk/res/android">
22 xmlns:android="http://schemas.android.com/apk/res/android" 22
23 style="@style/AppTheme.BlockTitle" 23 <data>
24 android:paddingBottom="@dimen/activity_vertical_margin" 24
25 android:paddingLeft="@dimen/activity_horizontal_margin" 25 <variable
26 android:paddingRight="@dimen/activity_horizontal_margin" 26 name="nodeInfo"
27 android:paddingTop="@dimen/activity_vertical_margin"/> 27 type="org.pacien.tincapp.activities.status.nodes.NodeInfo"/>
28
29 <variable
30 name="onClick"
31 type="kotlin.jvm.functions.Function1&lt;org.pacien.tincapp.activities.status.nodes.NodeInfo, kotlin.Unit>"/> <!-- https://stackoverflow.com/a/38777594 -->
32
33 </data>
34
35 <LinearLayout
36 style="@style/AppTheme.ListBlock.Clickable"
37 android:layout_width="match_parent"
38 android:layout_height="wrap_content"
39 android:onClick="@{() -> onClick.invoke(nodeInfo)}"
40 android:orientation="horizontal">
41
42 <TextView
43 style="@style/AppTheme.BlockTitle"
44 android:layout_weight="1"
45 android:text="@{nodeInfo.name}"/>
46
47 <TextView
48 android:layout_width="wrap_content"
49 android:layout_height="wrap_content"
50 android:layout_weight="0"
51 android:text="@{nodeInfo.reachabilityText()}"/>
52
53 </LinearLayout>
54
55</layout>