ui: layout: don't stretch text fields, so that alignment is correct

This makes things look uniform on RTL.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-04-13 17:47:36 +02:00
parent 19044b0f53
commit c2fdd0ca93
2 changed files with 25 additions and 25 deletions

View File

@ -71,7 +71,7 @@
<TextView
android:id="@+id/interface_name_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/interface_name_text"
@ -81,7 +81,7 @@
<TextView
android:id="@+id/interface_name_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/name"
android:nextFocusUp="@id/tunnel_switch"
@ -96,7 +96,7 @@
<TextView
android:id="@+id/public_key_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/public_key_text"
@ -106,7 +106,7 @@
<TextView
android:id="@+id/public_key_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/public_key"
android:ellipsize="end"
@ -124,7 +124,7 @@
<TextView
android:id="@+id/addresses_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/addresses_text"
@ -135,7 +135,7 @@
<TextView
android:id="@+id/addresses_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/addresses"
android:nextFocusUp="@id/public_key_text"
@ -151,7 +151,7 @@
<TextView
android:id="@+id/dns_servers_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/dns_servers_text"
@ -162,7 +162,7 @@
<TextView
android:id="@+id/dns_servers_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/dns_servers"
android:nextFocusUp="@id/addresses_text"
@ -178,7 +178,7 @@
<TextView
android:id="@+id/dns_search_domains_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/dns_search_domain_text"
@ -189,7 +189,7 @@
<TextView
android:id="@+id/dns_search_domains_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/dns_search_domains"
android:nextFocusUp="@id/dns_servers_text"
@ -277,7 +277,7 @@
<TextView
android:id="@+id/applications_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/applications_text"
@ -288,7 +288,7 @@
<TextView
android:id="@+id/applications_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/applications"
android:nextFocusUp="@id/mtu_text"

View File

@ -23,7 +23,7 @@
<com.google.android.material.textview.MaterialTextView
android:id="@+id/peer_title"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/peer"
android:textAppearance="?attr/textAppearanceTitleMedium"
@ -32,7 +32,7 @@
<TextView
android:id="@+id/public_key_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/public_key_text"
@ -42,7 +42,7 @@
<TextView
android:id="@+id/public_key_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/public_key"
android:ellipsize="end"
@ -59,7 +59,7 @@
<TextView
android:id="@+id/pre_shared_key_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/pre_shared_key_text"
@ -70,7 +70,7 @@
<TextView
android:id="@+id/pre_shared_key_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/pre_shared_key"
android:ellipsize="end"
@ -88,7 +88,7 @@
<TextView
android:id="@+id/allowed_ips_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/allowed_ips_text"
@ -99,7 +99,7 @@
<TextView
android:id="@+id/allowed_ips_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/allowed_ips"
android:nextFocusUp="@id/pre_shared_key_text"
@ -115,7 +115,7 @@
<TextView
android:id="@+id/endpoint_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/endpoint_text"
@ -126,7 +126,7 @@
<TextView
android:id="@+id/endpoint_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/endpoint"
android:nextFocusUp="@id/allowed_ips_text"
@ -142,7 +142,7 @@
<TextView
android:id="@+id/persistent_keepalive_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:labelFor="@+id/persistent_keepalive_text"
@ -153,7 +153,7 @@
<TextView
android:id="@+id/persistent_keepalive_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/persistent_keepalive"
android:nextFocusUp="@id/endpoint_text"
@ -169,7 +169,7 @@
<TextView
android:id="@+id/transfer_label"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/endpoint_text"
android:layout_marginTop="8dp"
@ -182,7 +182,7 @@
<TextView
android:id="@+id/transfer_text"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/transfer_label"
android:contentDescription="@string/transfer"