aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-07-24 12:32:40 -0500
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-25 02:05:11 +0200
commit2087a10f5533e4b61811a3cb4e5019dcf2560d81 (patch)
tree570f81ddc7b189e2a736f2ba669ab8ed553586d3 /app/src/main/res/layout
parenttools: Bump wireguard submodule (diff)
downloadwireguard-android-2087a10f5533e4b61811a3cb4e5019dcf2560d81.tar.xz
wireguard-android-2087a10f5533e4b61811a3cb4e5019dcf2560d81.zip
Added QR code scanner as tunnel import method
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/config_naming_dialog_fragment.xml25
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml52
2 files changed, 56 insertions, 21 deletions
diff --git a/app/src/main/res/layout/config_naming_dialog_fragment.xml b/app/src/main/res/layout/config_naming_dialog_fragment.xml
new file mode 100644
index 0000000..aae7804
--- /dev/null
+++ b/app/src/main/res/layout/config_naming_dialog_fragment.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="16dp">
+
+ <android.support.design.widget.TextInputLayout
+ android:id="@+id/tunnel_name_text_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <EditText
+ android:id="@+id/tunnel_name_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/tunnel_name" />
+
+ </android.support.design.widget.TextInputLayout>
+
+ </FrameLayout>
+
+
+</layout>
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml
index 4829313..2a7de39 100644
--- a/app/src/main/res/layout/tunnel_list_fragment.xml
+++ b/app/src/main/res/layout/tunnel_list_fragment.xml
@@ -38,6 +38,29 @@
app:layout="@{@layout/tunnel_list_item}"
app:configurationHandler="@{rowConfigurationHandler}" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
+ android:layout_gravity="center">
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/logo_placeholder"
+ android:layout_width="140dp"
+ android:layout_height="140dp"
+ android:layout_gravity="center"
+ android:tint="@color/transparent_background_placeholder"
+ android:layout_marginTop="-70dp"
+ android:layout_marginBottom="20dp"
+ android:src="@mipmap/ic_launcher" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textSize="20sp"
+ android:text="@string/tunnel_list_placeholder" />
+ </LinearLayout>
+
<com.wireguard.android.widget.fab.FloatingActionsMenu
android:id="@+id/create_menu"
android:clipChildren="false"
@@ -66,29 +89,16 @@
app:srcCompat="@drawable/ic_action_open_white"
app:fabSize="mini"
app:fab_title="@string/create_from_file" />
- </com.wireguard.android.widget.fab.FloatingActionsMenu>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"
- android:layout_gravity="center">
- <android.support.v7.widget.AppCompatImageView
- android:id="@+id/logo_placeholder"
- android:layout_width="140dp"
- android:layout_height="140dp"
- android:layout_gravity="center"
- android:tint="@color/transparent_background_placeholder"
- android:layout_marginTop="-70dp"
- android:layout_marginBottom="20dp"
- android:src="@mipmap/ic_launcher" />
- <TextView
+ <com.wireguard.android.widget.fab.LabeledFloatingActionButton
+ android:id="@+id/scan_qr_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:textSize="20sp"
- android:text="@string/tunnel_list_placeholder" />
- </LinearLayout>
+ android:onClick="@{fragment::onRequestScanQRCode}"
+ app:srcCompat="@drawable/ic_action_scan_qr_code_white"
+ app:fabSize="mini"
+ app:fab_title="@string/scan_qr_code" />
+ </com.wireguard.android.widget.fab.FloatingActionsMenu>
+
</android.support.design.widget.CoordinatorLayout>
</layout>