diff options
Diffstat (limited to 'ui/src/main/res/layout')
-rw-r--r-- | ui/src/main/res/layout/tunnel_editor_fragment.xml | 7 | ||||
-rw-r--r-- | ui/src/main/res/layout/tunnel_editor_peer.xml | 11 |
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 |