1<?xml version="1.0" encoding="utf-8"?>
2<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:app="http://schemas.android.com/apk/res-auto"
4 xmlns:tools="http://schemas.android.com/tools"
5 android:layout_width="match_parent"
6 android:layout_height="match_parent"
7 android:background="@color/grey200">
8
9 <ScrollView
10 android:layout_width="fill_parent"
11 android:layout_height="wrap_content"
12 android:layout_above="@+id/button_bar"
13 android:layout_alignParentTop="true">
14
15 <LinearLayout
16 android:id="@+id/account_main_layout"
17 android:layout_width="match_parent"
18 android:layout_height="wrap_content"
19 android:orientation="vertical">
20
21 <RelativeLayout
22 android:id="@+id/editor"
23 android:layout_width="fill_parent"
24 android:layout_height="wrap_content"
25 android:layout_marginBottom="@dimen/activity_vertical_margin"
26 android:layout_marginLeft="@dimen/activity_horizontal_margin"
27 android:layout_marginRight="@dimen/activity_horizontal_margin"
28 android:layout_marginTop="@dimen/activity_vertical_margin"
29 android:background="@drawable/infocard_border"
30 android:orientation="vertical"
31 android:padding="@dimen/infocard_padding">
32 <com.makeramen.roundedimageview.RoundedImageView
33 android:id="@+id/avater"
34 android:layout_width="72dp"
35 android:layout_height="72dp"
36 android:layout_alignParentTop="true"
37 android:layout_marginRight="16dp"
38 android:contentDescription="@string/account_image_description"
39 app:riv_corner_radius="2dp"/>
40 <LinearLayout
41 android:layout_width="fill_parent"
42 android:layout_height="wrap_content"
43 android:layout_toRightOf="@+id/avater"
44 android:orientation="vertical">
45 <TextView
46 android:id="@+id/account_jid_label"
47 android:layout_width="wrap_content"
48 android:layout_height="wrap_content"
49 android:text="@string/account_settings_jabber_id"
50 android:textColor="@color/black87"
51 android:textSize="?attr/TextSizeBody"/>
52
53 <AutoCompleteTextView
54 android:id="@+id/account_jid"
55 android:layout_width="match_parent"
56 android:layout_height="wrap_content"
57 android:hint="@string/account_settings_example_jabber_id"
58 android:inputType="textEmailAddress"
59 android:textColor="@color/black87"
60 android:textColorHint="@color/black54"
61 android:textSize="?attr/TextSizeBody"/>
62
63 <TextView
64 android:layout_width="wrap_content"
65 android:layout_height="wrap_content"
66 android:layout_marginTop="8dp"
67 android:text="@string/account_settings_password"
68 android:textColor="@color/black87"
69 android:textSize="?attr/TextSizeBody"/>
70
71 <EditText
72 android:id="@+id/account_password"
73 android:layout_width="match_parent"
74 android:layout_height="wrap_content"
75 android:hint="@string/password"
76 android:inputType="textPassword"
77 android:textColor="@color/black87"
78 android:textColorHint="@color/black54"
79 android:textSize="?attr/TextSizeBody"/>
80
81 <LinearLayout
82 android:id="@+id/name_port"
83 android:layout_width="fill_parent"
84 android:layout_height="wrap_content"
85 android:layout_marginTop="8dp"
86 android:orientation="horizontal"
87 android:weightSum="1">
88 <LinearLayout
89 android:layout_width="0dp"
90 android:layout_height="match_parent"
91 android:layout_weight="0.8"
92 android:orientation="vertical">
93 <TextView
94 android:id="@+id/textView"
95 android:layout_width="wrap_content"
96 android:layout_height="wrap_content"
97 android:text="@string/account_settings_hostname"
98 android:textColor="@color/black87"
99 android:textSize="?attr/TextSizeBody"/>
100 <EditText
101 android:id="@+id/hostname"
102 android:layout_width="fill_parent"
103 android:layout_height="wrap_content"
104 android:hint="@string/hostname_or_onion"
105 android:inputType="textNoSuggestions"
106 android:textColor="@color/black87"
107 android:textColorHint="@color/black54"
108 android:textSize="?attr/TextSizeBody"/>
109 </LinearLayout>
110 <LinearLayout
111 android:layout_width="0dp"
112 android:layout_height="match_parent"
113 android:layout_weight="0.2"
114 android:orientation="vertical"
115 >
116 <TextView
117 android:layout_width="wrap_content"
118 android:layout_height="wrap_content"
119 android:text="@string/account_settings_port"
120 android:textColor="@color/black87"
121 android:textSize="?attr/TextSizeBody"/>
122 <EditText
123 android:id="@+id/port"
124 android:layout_width="match_parent"
125 android:layout_height="match_parent"
126 android:inputType="number"
127 android:maxLength="5"
128 android:textColor="@color/black87"
129 android:textColorHint="@color/black54"
130 android:textSize="?attr/TextSizeBody"/>
131 </LinearLayout>
132 </LinearLayout>
133 <CheckBox
134 android:id="@+id/account_register_new"
135 android:layout_width="wrap_content"
136 android:layout_height="wrap_content"
137 android:layout_marginTop="8dp"
138 android:text="@string/register_account"
139 android:textColor="@color/black87"
140 android:textSize="?attr/TextSizeBody"/>
141
142 <TextView
143 android:id="@+id/account_confirm_password_desc"
144 android:layout_width="wrap_content"
145 android:layout_height="wrap_content"
146 android:text="@string/account_settings_confirm_password"
147 android:textColor="@color/black87"
148 android:textSize="?attr/TextSizeBody"
149 android:visibility="gone"/>
150
151 <EditText
152 android:id="@+id/account_password_confirm"
153 android:layout_width="match_parent"
154 android:layout_height="wrap_content"
155 android:layout_marginTop="8dp"
156 android:hint="@string/confirm_password"
157 android:inputType="textPassword"
158 android:textColor="@color/black87"
159 android:textColorHint="@color/black54"
160 android:textSize="?attr/TextSizeBody"
161 android:visibility="gone"/>
162 </LinearLayout>
163 </RelativeLayout>
164
165 <RelativeLayout
166 android:id="@+id/battery_optimization"
167 android:layout_width="fill_parent"
168 android:layout_height="wrap_content"
169 android:layout_marginBottom="@dimen/activity_vertical_margin"
170 android:layout_marginLeft="@dimen/activity_horizontal_margin"
171 android:layout_marginRight="@dimen/activity_horizontal_margin"
172 android:layout_marginTop="@dimen/activity_vertical_margin"
173 android:background="@drawable/infocard_border"
174 android:orientation="vertical"
175 android:padding="@dimen/infocard_padding"
176 android:visibility="gone">
177 <TextView
178 android:id="@+id/batt_op_headline"
179 android:layout_width="wrap_content"
180 android:layout_height="wrap_content"
181 android:text="@string/battery_optimizations_enabled"
182 android:textColor="@color/black87"
183 android:textSize="?attr/TextSizeHeadline"
184 android:textStyle="bold"/>
185 <TextView
186 android:id="@+id/batt_op_body"
187 android:layout_width="wrap_content"
188 android:layout_height="wrap_content"
189 android:layout_below="@+id/batt_op_headline"
190 android:layout_marginBottom="8dp"
191 android:layout_marginTop="8dp"
192 android:text="@string/battery_optimizations_enabled_explained"
193 android:textColor="@color/black87"
194 android:textSize="?attr/TextSizeBody"/>
195 <Button
196 android:id="@+id/batt_op_disable"
197 style="?android:attr/borderlessButtonStyle"
198 android:layout_marginRight="-8dp"
199 android:layout_width="wrap_content"
200 android:layout_height="wrap_content"
201 android:layout_alignParentBottom="true"
202 android:layout_alignParentEnd="true"
203 android:layout_alignParentRight="true" android:layout_below="@+id/batt_op_body"
204 android:text="@string/disable" android:textColor="@color/accent"/>
205 </RelativeLayout>
206
207
208 <LinearLayout
209 android:id="@+id/stats"
210 android:layout_width="fill_parent"
211 android:layout_height="fill_parent"
212 android:layout_marginBottom="@dimen/activity_vertical_margin"
213 android:layout_marginLeft="@dimen/activity_horizontal_margin"
214 android:layout_marginRight="@dimen/activity_horizontal_margin"
215 android:layout_marginTop="@dimen/activity_vertical_margin"
216 android:background="@drawable/infocard_border"
217 android:orientation="vertical"
218 android:padding="@dimen/infocard_padding"
219 android:visibility="gone">
220
221 <TableLayout
222 android:layout_width="match_parent"
223 android:layout_height="wrap_content"
224 android:stretchColumns="1">
225
226 <TableRow
227 android:layout_width="fill_parent"
228 android:layout_height="wrap_content"
229 tools:ignore="UselessParent">
230
231 <TextView
232 android:layout_width="wrap_content"
233 android:layout_height="wrap_content"
234 android:text="@string/server_info_session_established"
235 android:textColor="@color/black87"
236 android:textSize="?attr/TextSizeBody"/>
237
238 <TextView
239 android:id="@+id/session_est"
240 android:layout_width="wrap_content"
241 android:layout_height="wrap_content"
242 android:layout_gravity="right"
243 android:textColor="@color/black87"
244 android:textSize="?attr/TextSizeBody"
245 tools:ignore="RtlHardcoded"/>
246 </TableRow>
247
248 </TableLayout>
249 <TableLayout
250 android:id="@+id/server_info_more"
251 android:layout_width="match_parent"
252 android:layout_height="wrap_content"
253 android:stretchColumns="1"
254 android:visibility="gone">
255
256 <TableRow
257 android:layout_width="fill_parent"
258 android:layout_height="wrap_content">
259
260 <TextView
261 android:layout_width="wrap_content"
262 android:layout_height="wrap_content"
263 android:text="@string/server_info_pep"
264 android:textColor="@color/black87"
265 android:textSize="?attr/TextSizeBody"/>
266
267 <TextView
268 android:id="@+id/server_info_pep"
269 android:layout_width="wrap_content"
270 android:layout_height="wrap_content"
271 android:layout_gravity="right"
272 android:textColor="@color/black87"
273 android:textSize="?attr/TextSizeBody"
274 tools:ignore="RtlHardcoded"/>
275 </TableRow>
276
277 <TableRow
278 android:layout_width="fill_parent"
279 android:layout_height="wrap_content">
280
281 <TextView
282 android:layout_width="wrap_content"
283 android:layout_height="wrap_content"
284 android:text="@string/server_info_blocking"
285 android:textColor="@color/black87"
286 android:textSize="?attr/TextSizeBody"/>
287
288 <TextView
289 android:id="@+id/server_info_blocking"
290 android:layout_width="wrap_content"
291 android:layout_height="wrap_content"
292 android:layout_gravity="right"
293 android:textColor="@color/black87"
294 android:textSize="?attr/TextSizeBody"
295 tools:ignore="RtlHardcoded"/>
296 </TableRow>
297
298 <TableRow
299 android:layout_width="fill_parent"
300 android:layout_height="wrap_content">
301
302 <TextView
303 android:layout_width="wrap_content"
304 android:layout_height="wrap_content"
305 android:text="@string/server_info_stream_management"
306 android:textColor="@color/black87"
307 android:textSize="?attr/TextSizeBody"/>
308
309 <TextView
310 android:id="@+id/server_info_sm"
311 android:layout_width="wrap_content"
312 android:layout_height="wrap_content"
313 android:layout_gravity="right"
314 android:textColor="@color/black87"
315 android:textSize="?attr/TextSizeBody"
316 tools:ignore="RtlHardcoded"/>
317 </TableRow>
318
319 <TableRow
320 android:layout_width="fill_parent"
321 android:layout_height="wrap_content">
322
323 <TextView
324 android:layout_width="wrap_content"
325 android:layout_height="wrap_content"
326 android:text="@string/server_info_roster_version"
327 android:textColor="@color/black87"
328 android:textSize="?attr/TextSizeBody"/>
329
330 <TextView
331 android:id="@+id/server_info_roster_version"
332 android:layout_width="wrap_content"
333 android:layout_height="wrap_content"
334 android:layout_gravity="right"
335 android:textColor="@color/black87"
336 android:textSize="?attr/TextSizeBody"
337 tools:ignore="RtlHardcoded"/>
338 </TableRow>
339
340 <TableRow
341 android:layout_width="fill_parent"
342 android:layout_height="wrap_content">
343
344 <TextView
345 android:layout_width="wrap_content"
346 android:layout_height="wrap_content"
347 android:text="@string/server_info_carbon_messages"
348 android:textColor="@color/black87"
349 android:textSize="?attr/TextSizeBody"/>
350
351 <TextView
352 android:id="@+id/server_info_carbons"
353 android:layout_width="wrap_content"
354 android:layout_height="wrap_content"
355 android:layout_gravity="right"
356 android:textColor="@color/black87"
357 android:textSize="?attr/TextSizeBody"
358 tools:ignore="RtlHardcoded"/>
359 </TableRow>
360
361 <TableRow
362 android:layout_width="fill_parent"
363 android:layout_height="wrap_content">
364
365 <TextView
366 android:layout_width="wrap_content"
367 android:layout_height="wrap_content"
368 android:text="@string/server_info_mam"
369 android:textColor="@color/black87"
370 android:textSize="?attr/TextSizeBody"/>
371
372 <TextView
373 android:id="@+id/server_info_mam"
374 android:layout_width="wrap_content"
375 android:layout_height="wrap_content"
376 android:layout_gravity="right"
377 android:textColor="@color/black87"
378 android:textSize="?attr/TextSizeBody"
379 tools:ignore="RtlHardcoded"/>
380 </TableRow>
381
382 <TableRow
383 android:layout_width="fill_parent"
384 android:layout_height="wrap_content">
385
386 <TextView
387 android:layout_width="wrap_content"
388 android:layout_height="wrap_content"
389 android:text="@string/server_info_csi"
390 android:textColor="@color/black87"
391 android:textSize="?attr/TextSizeBody"/>
392
393 <TextView
394 android:id="@+id/server_info_csi"
395 android:layout_width="wrap_content"
396 android:layout_height="wrap_content"
397 android:layout_gravity="right"
398 android:textColor="@color/black87"
399 android:textSize="?attr/TextSizeBody"
400 tools:ignore="RtlHardcoded"/>
401 </TableRow>
402 <TableRow
403 android:layout_width="fill_parent"
404 android:layout_height="wrap_content">
405
406 <TextView
407 android:layout_width="wrap_content"
408 android:layout_height="wrap_content"
409 android:text="@string/server_info_http_upload"
410 android:textColor="@color/black87"
411 android:textSize="?attr/TextSizeBody"/>
412
413 <TextView
414 android:id="@+id/server_info_http_upload"
415 android:layout_width="wrap_content"
416 android:layout_height="wrap_content"
417 android:layout_gravity="right"
418 android:textColor="@color/black87"
419 android:textSize="?attr/TextSizeBody"
420 tools:ignore="RtlHardcoded"/>
421 </TableRow>
422 </TableLayout>
423
424 <RelativeLayout
425 android:id="@+id/otr_fingerprint_box"
426 android:layout_width="wrap_content"
427 android:layout_height="match_parent"
428 android:layout_marginTop="32dp">
429
430 <LinearLayout
431 android:layout_width="wrap_content"
432 android:layout_height="wrap_content"
433 android:layout_alignParentLeft="true"
434 android:layout_toLeftOf="@+id/action_copy_to_clipboard"
435 android:orientation="vertical">
436
437 <TextView
438 android:id="@+id/otr_fingerprint"
439 android:layout_width="wrap_content"
440 android:layout_height="wrap_content"
441 android:fontFamily="monospace"
442 android:textColor="@color/black87"
443 android:textSize="?attr/TextSizeBody"
444 android:typeface="monospace"/>
445
446 <TextView
447 android:layout_width="wrap_content"
448 android:layout_height="wrap_content"
449 android:text="@string/otr_fingerprint"
450 android:textColor="@color/black54"
451 android:textSize="?attr/TextSizeInfo"/>
452 </LinearLayout>
453
454 <ImageButton
455 android:id="@+id/action_copy_to_clipboard"
456 android:layout_width="wrap_content"
457 android:layout_height="wrap_content"
458 android:layout_alignParentRight="true"
459 android:layout_centerVertical="true"
460 android:background="?android:selectableItemBackground"
461 android:contentDescription="@string/copy_otr_clipboard_description"
462 android:padding="@dimen/image_button_padding"
463 android:src="?attr/icon_copy"
464 android:visibility="visible"/>
465 </RelativeLayout>
466 <RelativeLayout
467 android:id="@+id/axolotl_fingerprint_box"
468 android:layout_width="wrap_content"
469 android:layout_height="match_parent"
470 android:layout_marginTop="32dp">
471
472 <LinearLayout
473 android:layout_width="wrap_content"
474 android:layout_height="wrap_content"
475 android:layout_alignParentLeft="true"
476 android:layout_toLeftOf="@+id/axolotl_actions"
477 android:orientation="vertical">
478
479 <TextView
480 android:id="@+id/axolotl_fingerprint"
481 android:layout_width="wrap_content"
482 android:layout_height="wrap_content"
483 android:fontFamily="monospace"
484 android:textColor="@color/black87"
485 android:textSize="?attr/TextSizeBody"
486 android:typeface="monospace"/>
487
488 <TextView
489 android:layout_width="wrap_content"
490 android:layout_height="wrap_content"
491 android:text="@string/this_device_omemo_fingerprint"
492 android:textColor="@color/black54"
493 android:textSize="?attr/TextSizeInfo"/>
494 </LinearLayout>
495
496 <LinearLayout
497 android:id="@+id/axolotl_actions"
498 android:layout_width="wrap_content"
499 android:layout_height="wrap_content"
500 android:layout_alignParentRight="true"
501 android:layout_centerVertical="true"
502 android:orientation="vertical">
503
504 <ImageButton
505 android:id="@+id/action_copy_axolotl_to_clipboard"
506 android:layout_width="wrap_content"
507 android:layout_height="wrap_content"
508 android:background="?android:selectableItemBackground"
509 android:contentDescription="@string/copy_omemo_clipboard_description"
510 android:padding="@dimen/image_button_padding"
511 android:src="?attr/icon_copy"
512 android:visibility="visible"/>
513 <ImageButton
514 android:id="@+id/action_regenerate_axolotl_key"
515 android:layout_width="wrap_content"
516 android:layout_height="wrap_content"
517 android:background="?android:selectableItemBackground"
518 android:contentDescription="@string/regenerate_omemo_key"
519 android:padding="@dimen/image_button_padding"
520 android:src="?attr/icon_refresh"
521 android:visibility="gone"/>
522
523 </LinearLayout>
524 </RelativeLayout>
525 </LinearLayout>
526 <LinearLayout
527 android:id="@+id/other_device_keys_card"
528 android:layout_width="fill_parent"
529 android:layout_height="wrap_content"
530 android:layout_marginBottom="@dimen/activity_vertical_margin"
531 android:layout_marginLeft="@dimen/activity_horizontal_margin"
532 android:layout_marginRight="@dimen/activity_horizontal_margin"
533 android:layout_marginTop="@dimen/activity_vertical_margin"
534 android:background="@drawable/infocard_border"
535 android:orientation="vertical"
536 android:padding="@dimen/infocard_padding"
537 android:visibility="gone">
538
539 <TextView
540 android:id="@+id/other_device_keys_title"
541 android:layout_width="wrap_content"
542 android:layout_height="wrap_content"
543 android:text="@string/other_devices"
544 android:textColor="@color/black87"
545 android:textSize="?attr/TextSizeHeadline"
546 android:textStyle="bold"/>
547
548 <LinearLayout
549 android:id="@+id/other_device_keys"
550 android:layout_width="fill_parent"
551 android:layout_height="wrap_content"
552 android:divider="?android:dividerHorizontal"
553 android:orientation="vertical"
554 android:showDividers="middle">
555 </LinearLayout>
556 </LinearLayout>
557 </LinearLayout>
558 </ScrollView>
559
560 <LinearLayout
561 android:id="@+id/button_bar"
562 android:layout_width="wrap_content"
563 android:layout_height="wrap_content"
564 android:layout_alignParentBottom="true"
565 android:layout_alignParentEnd="true"
566 android:layout_alignParentLeft="true"
567 android:layout_alignParentRight="true"
568 android:layout_alignParentStart="true">
569
570 <Button
571 android:id="@+id/cancel_button"
572 style="?android:attr/borderlessButtonStyle"
573 android:layout_width="0dp"
574 android:layout_height="wrap_content"
575 android:layout_weight="1"
576 android:text="@string/cancel"
577 android:textColor="@color/black87"/>
578
579 <View
580 android:layout_width="1dp"
581 android:layout_height="fill_parent"
582 android:layout_marginBottom="7dp"
583 android:layout_marginTop="7dp"
584 android:background="@color/black12"/>
585
586 <Button
587 android:id="@+id/save_button"
588 style="?android:attr/borderlessButtonStyle"
589 android:layout_width="0dp"
590 android:layout_height="wrap_content"
591 android:layout_weight="1"
592 android:enabled="false"
593 android:text="@string/save"
594 android:textColor="@color/black54"/>
595 </LinearLayout>
596
597</RelativeLayout>