summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/res/layout
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-29 19:34:27 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-30 03:23:32 -0600
commitd44a83faaaf48080b8ab9ed6f1e32d98ac0579bc (patch)
treed0701e1c20e8de3b4489c09ff7c23e61d38b74af /ui/src/main/res/layout
parent2337fe37bef7196099d9f55353a868127df52bdc (diff)
TunnelEditorFragment: add hooks for biometric auth
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r--ui/src/main/res/layout/tunnel_editor_fragment.xml7
-rw-r--r--ui/src/main/res/layout/tunnel_editor_peer.xml11
2 files changed, 14 insertions, 4 deletions
diff --git a/ui/src/main/res/layout/tunnel_editor_fragment.xml b/ui/src/main/res/layout/tunnel_editor_fragment.xml
index d87e1efb..d5724c11 100644
--- a/ui/src/main/res/layout/tunnel_editor_fragment.xml
+++ b/ui/src/main/res/layout/tunnel_editor_fragment.xml
@@ -102,9 +102,11 @@
android:id="@+id/private_key_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:inputType="textNoSuggestions|textVisiblePassword"
+ android:inputType="textNoSuggestions|textPassword"
+ android:onClick="@{fragment::onKeyClick}"
android:text="@={config.interface.privateKey}"
- app:filter="@{KeyInputFilter.newInstance()}" />
+ app:filter="@{KeyInputFilter.newInstance()}"
+ app:onFocusChange="@{fragment::onKeyFocusChange}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
@@ -234,6 +236,7 @@
android:layout_height="wrap_content"
android:divider="@null"
android:orientation="vertical"
+ app:fragment="@{fragment}"
app:items="@{config.peers}"
app:layout="@{@layout/tunnel_editor_peer}"
tools:ignore="UselessLeaf" />
diff --git a/ui/src/main/res/layout/tunnel_editor_peer.xml b/ui/src/main/res/layout/tunnel_editor_peer.xml
index 2f3b0689..f00a6d26 100644
--- a/ui/src/main/res/layout/tunnel_editor_peer.xml
+++ b/ui/src/main/res/layout/tunnel_editor_peer.xml
@@ -15,6 +15,10 @@
<variable
name="item"
type="com.wireguard.android.viewmodel.PeerProxy" />
+
+ <variable
+ name="fragment"
+ type="com.wireguard.android.fragment.TunnelEditorFragment" />
</data>
<com.google.android.material.card.MaterialCardView
@@ -91,8 +95,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_optional"
- android:inputType="textNoSuggestions|textVisiblePassword"
- android:text="@={item.preSharedKey}" />
+ android:inputType="textNoSuggestions|textPassword"
+ android:onClick="@{fragment::onKeyClick}"
+ android:text="@={item.preSharedKey}"
+ app:filter="@{KeyInputFilter.newInstance()}"
+ app:onFocusChange="@{fragment::onKeyFocusChange}" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout