diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-28 04:45:17 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-28 04:51:43 +0200 |
commit | 7182abff8ed312228a32690f0baf366d7c101cb5 (patch) | |
tree | 21a9a0f4de77b67669949534c27e033d1ee896c3 /app/src/main/res/layout/tunnel_editor_peer.xml | |
parent | Do not do DNS lookups for IPs (diff) | |
download | wireguard-android-7182abff8ed312228a32690f0baf366d7c101cb5.tar.xz wireguard-android-7182abff8ed312228a32690f0baf366d7c101cb5.zip |
Use validation instead of two-way binding
This is insane, but it appears to be working. We essentially store
things in a separate class for editing, and then commit it back at a
given time.
This business with onViewStateRestored in both TunnelEditorFragment and
in TunnelDetailFragment is buggy and likely wrong.
In general TunnelEditorFragment should probably be rewritten. The
relationship with the changed name is not clear.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/tunnel_editor_peer.xml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/res/layout/tunnel_editor_peer.xml b/app/src/main/res/layout/tunnel_editor_peer.xml index cc5fe933..b6caab8a 100644 --- a/app/src/main/res/layout/tunnel_editor_peer.xml +++ b/app/src/main/res/layout/tunnel_editor_peer.xml @@ -8,11 +8,11 @@ <variable name="collection" - type="android.databinding.ObservableList<com.wireguard.config.Peer>" /> + type="android.databinding.ObservableList<com.wireguard.config.Peer.Observable>" /> <variable name="item" - type="com.wireguard.config.Peer" /> + type="com.wireguard.config.Peer.Observable" /> </data> <RelativeLayout @@ -96,7 +96,7 @@ android:layout_height="wrap_content" android:layout_below="@+id/allowed_ips_label" android:inputType="textNoSuggestions|textVisiblePassword" - android:text="@={item.allowedIPsString}" /> + android:text="@={item.allowedIPs}" /> <TextView android:id="@+id/endpoint_label" @@ -116,7 +116,7 @@ android:layout_below="@+id/endpoint_label" android:layout_toStartOf="@+id/persistent_keepalive_text" android:inputType="textNoSuggestions|textVisiblePassword" - android:text="@={item.endpointString}" /> + android:text="@={item.endpoint}" /> <TextView android:id="@+id/persistent_keepalive_label" @@ -136,7 +136,7 @@ android:layout_alignStart="@+id/persistent_keepalive_label" android:hint="@string/hint_optional" android:inputType="number" - android:text="@={item.persistentKeepaliveString}" + android:text="@={item.persistentKeepalive}" android:textAlignment="center" /> </RelativeLayout> </layout> |