summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-06 05:05:09 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-06 18:17:58 +0200
commit78d976162d5b88590750e854f0d7974b5163dccc (patch)
tree67ad1153eec8988cdfcfa88d9a6ccd06a455ca09
parent7078162c690abdf618d801035dd3b940ffcfd0fc (diff)
PeerEditor: put exclusion checkbox next to label
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--app/src/main/res/layout/tunnel_editor_peer.xml24
-rw-r--r--app/src/main/res/values/strings.xml3
2 files changed, 14 insertions, 13 deletions
diff --git a/app/src/main/res/layout/tunnel_editor_peer.xml b/app/src/main/res/layout/tunnel_editor_peer.xml
index 5a84fd92..8afc5006 100644
--- a/app/src/main/res/layout/tunnel_editor_peer.xml
+++ b/app/src/main/res/layout/tunnel_editor_peer.xml
@@ -93,9 +93,21 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/pre_shared_key_text"
+ android:layout_toStartOf="@+id/exclude_private_ips"
android:labelFor="@+id/allowed_ips_text"
android:text="@string/allowed_ips" />
+ <CheckBox
+ android:id="@+id/exclude_private_ips"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignBaseline="@+id/allowed_ips_label"
+ android:layout_alignParentEnd="true"
+ android:checked="@{item.allowedIPsContainsDefaultRouteModRFC1918}"
+ android:onClick="@{() -> item.toggleExcludePrivateIPs()}"
+ android:text="@string/exclude_private_ips"
+ android:visibility="@{(item.allowedIPsContainsDefaultRoute || item.allowedIPsContainsDefaultRouteModRFC1918) ? View.VISIBLE : View.GONE}" />
+
<EditText
android:id="@+id/allowed_ips_text"
android:layout_width="match_parent"
@@ -104,22 +116,12 @@
android:inputType="textNoSuggestions|textVisiblePassword"
android:text="@={item.allowedIPs}" />
- <CheckBox
- android:id="@+id/exclude_private_ips"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/allowed_ips_text"
- android:visibility="@{(item.allowedIPsContainsDefaultRoute || item.allowedIPsContainsDefaultRouteModRFC1918) ? View.VISIBLE : View.GONE}"
- android:checked="@{item.allowedIPsContainsDefaultRouteModRFC1918}"
- android:onClick="@{() -> item.toggleExcludePrivateIPs()}"
- android:text="@string/exclude_private_ips" />
-
<TextView
android:id="@+id/endpoint_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
- android:layout_below="@+id/exclude_private_ips"
+ android:layout_below="@+id/allowed_ips_text"
android:layout_toStartOf="@+id/persistent_keepalive_label"
android:labelFor="@+id/endpoint_text"
android:text="@string/endpoint" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index defd4370..b7f6930a 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -44,7 +44,7 @@
<string name="error_root">Please obtain root access and try again</string>
<string name="error_up">Error bringing up tunnel: %s</string>
<string name="excluded_applications">Excluded Applications</string>
- <string name="exclude_private_ips">Exclude Private IPs</string>
+ <string name="exclude_private_ips">Exclude private IPs</string>
<string name="generate">Generate</string>
<string name="hint_automatic">(auto)</string>
<string name="hint_generated">(generated)</string>
@@ -95,7 +95,6 @@
<string name="version_summary">%s backend v%s</string>
<string name="version_summary_checking">Checking %s backend version</string>
<string name="version_summary_unknown">Unknown %s version</string>
- <string name="x_excluded_applications">%d Excluded Applications</string>
<string name="zip_exporter_title">Export tunnels to zip file</string>
<string name="zip_export_error">Unable to export tunnels: %s</string>
<string name="zip_export_success">Saved to %s</string>