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