Skip to content

Commit 4ab7ac5

Browse files
committed
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 <[email protected]>
1 parent 19044b0 commit 4ab7ac5

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

ui/src/main/res/layout/tunnel_detail_fragment.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
<TextView
7373
android:id="@+id/interface_name_label"
74-
android:layout_width="match_parent"
74+
android:layout_width="wrap_content"
7575
android:layout_height="wrap_content"
7676
android:layout_marginTop="8dp"
7777
android:labelFor="@+id/interface_name_text"
@@ -81,7 +81,7 @@
8181

8282
<TextView
8383
android:id="@+id/interface_name_text"
84-
android:layout_width="match_parent"
84+
android:layout_width="wrap_content"
8585
android:layout_height="wrap_content"
8686
android:contentDescription="@string/name"
8787
android:nextFocusUp="@id/tunnel_switch"
@@ -96,7 +96,7 @@
9696

9797
<TextView
9898
android:id="@+id/public_key_label"
99-
android:layout_width="match_parent"
99+
android:layout_width="wrap_content"
100100
android:layout_height="wrap_content"
101101
android:layout_marginTop="8dp"
102102
android:labelFor="@+id/public_key_text"
@@ -106,7 +106,7 @@
106106

107107
<TextView
108108
android:id="@+id/public_key_text"
109-
android:layout_width="match_parent"
109+
android:layout_width="wrap_content"
110110
android:layout_height="wrap_content"
111111
android:contentDescription="@string/public_key"
112112
android:ellipsize="end"
@@ -124,7 +124,7 @@
124124

125125
<TextView
126126
android:id="@+id/addresses_label"
127-
android:layout_width="match_parent"
127+
android:layout_width="wrap_content"
128128
android:layout_height="wrap_content"
129129
android:layout_marginTop="8dp"
130130
android:labelFor="@+id/addresses_text"
@@ -135,7 +135,7 @@
135135

136136
<TextView
137137
android:id="@+id/addresses_text"
138-
android:layout_width="match_parent"
138+
android:layout_width="wrap_content"
139139
android:layout_height="wrap_content"
140140
android:contentDescription="@string/addresses"
141141
android:nextFocusUp="@id/public_key_text"
@@ -151,7 +151,7 @@
151151

152152
<TextView
153153
android:id="@+id/dns_servers_label"
154-
android:layout_width="match_parent"
154+
android:layout_width="wrap_content"
155155
android:layout_height="wrap_content"
156156
android:layout_marginTop="8dp"
157157
android:labelFor="@+id/dns_servers_text"
@@ -162,7 +162,7 @@
162162

163163
<TextView
164164
android:id="@+id/dns_servers_text"
165-
android:layout_width="match_parent"
165+
android:layout_width="wrap_content"
166166
android:layout_height="wrap_content"
167167
android:contentDescription="@string/dns_servers"
168168
android:nextFocusUp="@id/addresses_text"
@@ -178,7 +178,7 @@
178178

179179
<TextView
180180
android:id="@+id/dns_search_domains_label"
181-
android:layout_width="match_parent"
181+
android:layout_width="wrap_content"
182182
android:layout_height="wrap_content"
183183
android:layout_marginTop="8dp"
184184
android:labelFor="@+id/dns_search_domain_text"
@@ -189,7 +189,7 @@
189189

190190
<TextView
191191
android:id="@+id/dns_search_domains_text"
192-
android:layout_width="match_parent"
192+
android:layout_width="wrap_content"
193193
android:layout_height="wrap_content"
194194
android:contentDescription="@string/dns_search_domains"
195195
android:nextFocusUp="@id/dns_servers_text"
@@ -277,7 +277,7 @@
277277

278278
<TextView
279279
android:id="@+id/applications_label"
280-
android:layout_width="match_parent"
280+
android:layout_width="wrap_content"
281281
android:layout_height="wrap_content"
282282
android:layout_marginTop="8dp"
283283
android:labelFor="@+id/applications_text"
@@ -288,7 +288,7 @@
288288

289289
<TextView
290290
android:id="@+id/applications_text"
291-
android:layout_width="match_parent"
291+
android:layout_width="wrap_content"
292292
android:layout_height="wrap_content"
293293
android:contentDescription="@string/applications"
294294
android:nextFocusUp="@id/mtu_text"

ui/src/main/res/layout/tunnel_detail_peer.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<com.google.android.material.textview.MaterialTextView
2525
android:id="@+id/peer_title"
26-
android:layout_width="match_parent"
26+
android:layout_width="wrap_content"
2727
android:layout_height="wrap_content"
2828
android:text="@string/peer"
2929
android:textAppearance="?attr/textAppearanceTitleMedium"
@@ -32,7 +32,7 @@
3232

3333
<TextView
3434
android:id="@+id/public_key_label"
35-
android:layout_width="match_parent"
35+
android:layout_width="wrap_content"
3636
android:layout_height="wrap_content"
3737
android:layout_marginTop="8dp"
3838
android:labelFor="@+id/public_key_text"
@@ -42,7 +42,7 @@
4242

4343
<TextView
4444
android:id="@+id/public_key_text"
45-
android:layout_width="match_parent"
45+
android:layout_width="wrap_content"
4646
android:layout_height="wrap_content"
4747
android:contentDescription="@string/public_key"
4848
android:ellipsize="end"
@@ -59,7 +59,7 @@
5959

6060
<TextView
6161
android:id="@+id/pre_shared_key_label"
62-
android:layout_width="match_parent"
62+
android:layout_width="wrap_content"
6363
android:layout_height="wrap_content"
6464
android:layout_marginTop="8dp"
6565
android:labelFor="@+id/pre_shared_key_text"
@@ -70,7 +70,7 @@
7070

7171
<TextView
7272
android:id="@+id/pre_shared_key_text"
73-
android:layout_width="match_parent"
73+
android:layout_width="wrap_content"
7474
android:layout_height="wrap_content"
7575
android:contentDescription="@string/pre_shared_key"
7676
android:ellipsize="end"
@@ -88,7 +88,7 @@
8888

8989
<TextView
9090
android:id="@+id/allowed_ips_label"
91-
android:layout_width="match_parent"
91+
android:layout_width="wrap_content"
9292
android:layout_height="wrap_content"
9393
android:layout_marginTop="8dp"
9494
android:labelFor="@+id/allowed_ips_text"
@@ -99,7 +99,7 @@
9999

100100
<TextView
101101
android:id="@+id/allowed_ips_text"
102-
android:layout_width="match_parent"
102+
android:layout_width="wrap_content"
103103
android:layout_height="wrap_content"
104104
android:contentDescription="@string/allowed_ips"
105105
android:nextFocusUp="@id/pre_shared_key_text"
@@ -115,7 +115,7 @@
115115

116116
<TextView
117117
android:id="@+id/endpoint_label"
118-
android:layout_width="match_parent"
118+
android:layout_width="wrap_content"
119119
android:layout_height="wrap_content"
120120
android:layout_marginTop="8dp"
121121
android:labelFor="@+id/endpoint_text"
@@ -126,7 +126,7 @@
126126

127127
<TextView
128128
android:id="@+id/endpoint_text"
129-
android:layout_width="match_parent"
129+
android:layout_width="wrap_content"
130130
android:layout_height="wrap_content"
131131
android:contentDescription="@string/endpoint"
132132
android:nextFocusUp="@id/allowed_ips_text"
@@ -142,7 +142,7 @@
142142

143143
<TextView
144144
android:id="@+id/persistent_keepalive_label"
145-
android:layout_width="match_parent"
145+
android:layout_width="wrap_content"
146146
android:layout_height="wrap_content"
147147
android:layout_marginTop="8dp"
148148
android:labelFor="@+id/persistent_keepalive_text"
@@ -153,7 +153,7 @@
153153

154154
<TextView
155155
android:id="@+id/persistent_keepalive_text"
156-
android:layout_width="match_parent"
156+
android:layout_width="wrap_content"
157157
android:layout_height="wrap_content"
158158
android:contentDescription="@string/persistent_keepalive"
159159
android:nextFocusUp="@id/endpoint_text"
@@ -169,7 +169,7 @@
169169

170170
<TextView
171171
android:id="@+id/transfer_label"
172-
android:layout_width="match_parent"
172+
android:layout_width="wrap_content"
173173
android:layout_height="wrap_content"
174174
android:layout_below="@+id/endpoint_text"
175175
android:layout_marginTop="8dp"
@@ -182,7 +182,7 @@
182182

183183
<TextView
184184
android:id="@+id/transfer_text"
185-
android:layout_width="match_parent"
185+
android:layout_width="wrap_content"
186186
android:layout_height="wrap_content"
187187
android:layout_below="@+id/transfer_label"
188188
android:contentDescription="@string/transfer"

0 commit comments

Comments
 (0)