diff options
author | Samuel Holland <samuel@sholland.org> | 2017-08-24 02:11:55 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-08-24 02:11:55 -0500 |
commit | dcc7ddcd3b34de4fb9d50742fd0679f8237e386c (patch) | |
tree | da2723ce093902dd87d1f6e8b3899bdad481e550 /app/src/main/res | |
parent | 4fdb3458ec7c5c58f500f64d8efcffd99e0e9dde (diff) |
ConfigEditFragment: Copy public key on click
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/config_edit_fragment.xml | 3 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/res/layout/config_edit_fragment.xml b/app/src/main/res/layout/config_edit_fragment.xml index 86045324..e0d564f9 100644 --- a/app/src/main/res/layout/config_edit_fragment.xml +++ b/app/src/main/res/layout/config_edit_fragment.xml @@ -5,6 +5,8 @@ <data> + <import type="com.wireguard.android.ConfigEditFragment" /> + <import type="com.wireguard.android.KeyInputFilter" /> <import type="com.wireguard.android.NameInputFilter" /> @@ -107,6 +109,7 @@ android:focusable="false" android:hint="@string/hint_generated" android:maxLines="1" + android:onClick="@{(view) -> ConfigEditFragment.copyPublicKey(view.getContext(), config.interface.publicKey)}" android:text="@{config.interface.publicKey}" /> <TextView diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 62e4fa4e..bc2ec7a9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -34,6 +34,8 @@ <string name="primary_config_summary">This configuration will be controlled by the quick settings tile</string> <string name="private_key">Private key</string> <string name="public_key">Public key</string> + <string name="public_key_copied_message">Public key copied to clipboard</string> + <string name="public_key_description">WireGuard public key</string> <string name="restore_on_boot">Restore on boot</string> <string name="restore_on_boot_summary">Restore previously enabled configurations on boot</string> <string name="save">Save</string> |