aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/res/layout/tunnel_list_fragment.xml
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2018-07-22 11:52:11 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-22 23:21:17 +0200
commit76fb6a318e7a8e1f26cd82692750c4584cda5298 (patch)
tree80dc4b51c3ab94e6da553c8dce3a8b527a72afdf /app/src/main/res/layout/tunnel_list_fragment.xml
parentFloatingActionsMenuRecyclerViewScrollListener: add final modifiers (diff)
downloadwireguard-android-76fb6a318e7a8e1f26cd82692750c4584cda5298.tar.xz
wireguard-android-76fb6a318e7a8e1f26cd82692750c4584cda5298.zip
Show help text when no tunnels are imported
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/res/layout/tunnel_list_fragment.xml')
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml
index dc85bf3f..377aeac1 100644
--- a/app/src/main/res/layout/tunnel_list_fragment.xml
+++ b/app/src/main/res/layout/tunnel_list_fragment.xml
@@ -33,6 +33,7 @@
android:paddingBottom="@{@dimen/design_fab_size_normal * 1.1f}"
android:clipToPadding="false"
android:choiceMode="multipleChoiceModal"
+ android:visibility="@{tunnels.size() > 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
app:items="@{tunnels}"
app:layout="@{@layout/tunnel_list_item}"
app:configurationHandler="@{rowConfigurationHandler}" />
@@ -66,5 +67,18 @@
app:fabSize="mini"
app:fab_title="@string/create_from_file" />
</com.wireguard.android.widget.fab.FloatingActionsMenu>
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
+ android:layout_gravity="center">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="24sp"
+ android:layout_centerInParent="true"
+ android:text="@string/no_tunnels_imported_placeholder" />
+ </RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
</layout>