summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/res/layout/tunnel_editor_peer.xml
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-09-20 13:32:31 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-09-20 13:33:48 +0530
commit7cff4367d7026b5ed2c93fb97735e2146dcecbc1 (patch)
tree9bb0b487bf25182c79204c643d66ba7e9fc17d06 /ui/src/main/res/layout/tunnel_editor_peer.xml
parent9eaed5e74592c430d4b680df8d9a67fe5fda32f2 (diff)
ui: add navigation hints for D-Pad and IME
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/res/layout/tunnel_editor_peer.xml')
-rw-r--r--ui/src/main/res/layout/tunnel_editor_peer.xml24
1 files changed, 24 insertions, 0 deletions
diff --git a/ui/src/main/res/layout/tunnel_editor_peer.xml b/ui/src/main/res/layout/tunnel_editor_peer.xml
index 76aaa1cd..27a6d125 100644
--- a/ui/src/main/res/layout/tunnel_editor_peer.xml
+++ b/ui/src/main/res/layout/tunnel_editor_peer.xml
@@ -51,6 +51,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@null"
+ android:nextFocusDown="@id/public_key_text"
+ android:nextFocusForward="@id/public_key_text"
android:onClick="@{() -> item.unbind()}"
android:padding="8dp"
android:src="@drawable/ic_action_delete"
@@ -73,7 +75,11 @@
android:id="@+id/public_key_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:imeOptions="actionNext"
android:inputType="textNoSuggestions|textVisiblePassword"
+ android:nextFocusUp="@id/delete"
+ android:nextFocusDown="@id/pre_shared_key_text"
+ android:nextFocusForward="@id/pre_shared_key_text"
android:text="@={item.publicKey}"
app:filter="@{KeyInputFilter.newInstance()}" />
</com.google.android.material.textfield.TextInputLayout>
@@ -94,7 +100,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_optional"
+ android:imeOptions="actionNext"
android:inputType="textNoSuggestions|textPassword"
+ android:nextFocusUp="@id/public_key_text"
+ android:nextFocusDown="@id/persistent_keepalive_text"
+ android:nextFocusForward="@id/persistent_keepalive_text"
android:onClick="@{fragment::onKeyClick}"
android:text="@={item.preSharedKey}"
app:filter="@{KeyInputFilter.newInstance()}"
@@ -118,7 +128,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_optional_discouraged"
+ android:imeOptions="actionNext"
android:inputType="number"
+ android:nextFocusUp="@id/persistent_keepalive_text"
+ android:nextFocusDown="@id/endpoint_text"
+ android:nextFocusForward="@id/endpoint_text"
android:text="@={item.persistentKeepalive}" />
</com.google.android.material.textfield.TextInputLayout>
@@ -136,7 +150,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
+ android:imeOptions="actionNext"
android:inputType="textNoSuggestions|textVisiblePassword"
+ android:nextFocusUp="@id/persistent_keepalive_text"
+ android:nextFocusDown="@id/allowed_ips_text"
+ android:nextFocusForward="@id/allowed_ips_text"
android:text="@={item.endpoint}" />
</com.google.android.material.textfield.TextInputLayout>
@@ -155,7 +173,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
+ android:imeOptions="actionDone"
android:inputType="textNoSuggestions|textVisiblePassword"
+ android:nextFocusUp="@id/endpoint_text"
+ android:nextFocusDown="@id/selected_checkbox"
+ android:nextFocusForward="@id/selected_checkbox"
android:text="@={item.allowedIps}" />
</com.google.android.material.textfield.TextInputLayout>
@@ -166,6 +188,8 @@
android:layout_marginStart="4dp"
android:layout_marginTop="0dp"
android:checked="@={item.excludingPrivateIps}"
+ android:nextFocusDown="@id/add_peer_button"
+ android:nextFocusForward="@id/add_peer_button"
android:text="@string/exclude_private_ips"
android:visibility="@{item.ableToExcludePrivateIps ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent"