From 2087a10f5533e4b61811a3cb4e5019dcf2560d81 Mon Sep 17 00:00:00 2001 From: Eric Kuck Date: Tue, 24 Jul 2018 12:32:40 -0500 Subject: Added QR code scanner as tunnel import method --- .../res/drawable/ic_action_scan_qr_code_white.xml | 9 ++++ .../res/layout/config_naming_dialog_fragment.xml | 25 +++++++++++ app/src/main/res/layout/tunnel_list_fragment.xml | 52 +++++++++++++--------- app/src/main/res/values/strings.xml | 3 ++ 4 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 app/src/main/res/drawable/ic_action_scan_qr_code_white.xml create mode 100644 app/src/main/res/layout/config_naming_dialog_fragment.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/ic_action_scan_qr_code_white.xml b/app/src/main/res/drawable/ic_action_scan_qr_code_white.xml new file mode 100644 index 00000000..cdd83361 --- /dev/null +++ b/app/src/main/res/drawable/ic_action_scan_qr_code_white.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file 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 00000000..aae78049 --- /dev/null +++ b/app/src/main/res/layout/config_naming_dialog_fragment.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml index 48293133..2a7de392 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}" /> + + + + + - - - - - + android:onClick="@{fragment::onRequestScanQRCode}" + app:srcCompat="@drawable/ic_action_scan_qr_code_white" + app:fabSize="mini" + app:fab_title="@string/scan_qr_code" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bfaf71b6..1bb43fa0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -30,6 +30,7 @@ Create WireGuard Tunnel Create from scratch Create from file or archive + Create Tunnel Use dark theme Currently using dark night theme Currently using light day theme @@ -71,6 +72,7 @@ Bring up previously-enabled tunnels on boot Restore on boot Save + Scan QR Code %d Excluded Application %d Excluded Applications @@ -90,6 +92,7 @@ Unable to create tunnel: %s Successfully created tunnel ā€œ%sā€ Add a tunnel using the blue button + Tunnel Name Unable to rename tunnel: %s Successfully renamed tunnel to ā€œ%sā€ WireGuard for Android v%s" -- cgit v1.2.3-59-g8ed1b