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:textColor="?attr/color_text_primary"
166 android:textSize="?attr/TextSizeHeadline"
167 android:textStyle="bold"/>
168
169 <TextView
170 android:id="@+id/os_optimization_body"
171 android:layout_width="wrap_content"
172 android:layout_height="wrap_content"
173 android:layout_below="@+id/os_optimization_headline"
174 android:layout_marginBottom="8dp"
175 android:layout_marginTop="8dp"
176 android:text="@string/battery_optimizations_enabled_explained"
177 android:textColor="?attr/color_text_primary"
178 android:textSize="?attr/TextSizeBody"/>
179
180 <Button
181 android:id="@+id/os_optimization_disable"
182 style="?android:attr/borderlessButtonStyle"
183 android:layout_width="wrap_content"
184 android:layout_height="wrap_content"
185 android:layout_alignParentBottom="true"
186 android:layout_alignParentEnd="true"
187 android:layout_alignParentRight="true"
188 android:layout_below="@+id/os_optimization_body"
189 android:layout_marginRight="-8dp"
190 android:text="@string/disable"
191 android:textColor="@color/accent"/>
192 </RelativeLayout>
193 </android.support.v7.widget.CardView>
194
195
196 <android.support.v7.widget.CardView
197 android:id="@+id/stats"
198 android:layout_width="fill_parent"
199 android:layout_height="fill_parent"
200 android:layout_marginBottom="@dimen/activity_vertical_margin"
201 android:layout_marginLeft="@dimen/activity_horizontal_margin"
202 android:layout_marginRight="@dimen/activity_horizontal_margin"
203 android:layout_marginTop="@dimen/activity_vertical_margin"
204 android:visibility="gone">
205
206 <LinearLayout
207 android:layout_width="match_parent"
208 android:layout_height="wrap_content"
209 android:orientation="vertical"
210 android:padding="@dimen/card_padding_regular">
211
212 <TableLayout
213 android:layout_width="match_parent"
214 android:layout_height="wrap_content"
215 android:shrinkColumns="0"
216 android:stretchColumns="1">
217
218 <TableRow
219 android:layout_width="fill_parent"
220 android:layout_height="wrap_content"
221 tools:ignore="UselessParent">
222
223 <TextView
224 android:layout_width="wrap_content"
225 android:layout_height="wrap_content"
226 android:ellipsize="end"
227 android:singleLine="true"
228 android:text="@string/server_info_session_established"
229 android:textColor="?attr/color_text_primary"
230 android:textSize="?attr/TextSizeBody"/>
231
232 <TextView
233 android:id="@+id/session_est"
234 android:layout_width="wrap_content"
235 android:layout_height="wrap_content"
236 android:layout_gravity="right"
237 android:paddingLeft="4dp"
238 android:textColor="?attr/color_text_primary"
239 android:textSize="?attr/TextSizeBody"
240 tools:ignore="RtlHardcoded"/>
241 </TableRow>
242
243 </TableLayout>
244
245 <TableLayout
246 android:id="@+id/server_info_more"
247 android:layout_width="match_parent"
248 android:layout_height="wrap_content"
249 android:shrinkColumns="0"
250 android:stretchColumns="1"
251 android:visibility="gone">
252
253 <TableRow
254 android:layout_width="fill_parent"
255 android:layout_height="wrap_content">
256
257 <TextView
258 android:layout_width="wrap_content"
259 android:layout_height="wrap_content"
260 android:ellipsize="end"
261 android:singleLine="true"
262 android:text="@string/server_info_pep"
263 android:textColor="?attr/color_text_primary"
264 android:textSize="?attr/TextSizeBody"/>
265
266 <TextView
267 android:id="@+id/server_info_pep"
268 android:layout_width="wrap_content"
269 android:layout_height="wrap_content"
270 android:layout_gravity="right"
271 android:paddingLeft="4dp"
272 android:textColor="?attr/color_text_primary"
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:ellipsize="end"
285 android:singleLine="true"
286 android:text="@string/server_info_blocking"
287 android:textColor="?attr/color_text_primary"
288 android:textSize="?attr/TextSizeBody"/>
289
290 <TextView
291 android:id="@+id/server_info_blocking"
292 android:layout_width="wrap_content"
293 android:layout_height="wrap_content"
294 android:layout_gravity="right"
295 android:paddingLeft="4dp"
296 android:textColor="?attr/color_text_primary"
297 android:textSize="?attr/TextSizeBody"
298 tools:ignore="RtlHardcoded"/>
299 </TableRow>
300
301 <TableRow
302 android:layout_width="fill_parent"
303 android:layout_height="wrap_content">
304
305 <TextView
306 android:layout_width="wrap_content"
307 android:layout_height="wrap_content"
308 android:ellipsize="end"
309 android:singleLine="true"
310 android:text="@string/server_info_stream_management"
311 android:textColor="?attr/color_text_primary"
312 android:textSize="?attr/TextSizeBody"/>
313
314 <TextView
315 android:id="@+id/server_info_sm"
316 android:layout_width="wrap_content"
317 android:layout_height="wrap_content"
318 android:layout_gravity="right"
319 android:paddingLeft="4dp"
320 android:textColor="?attr/color_text_primary"
321 android:textSize="?attr/TextSizeBody"
322 tools:ignore="RtlHardcoded"/>
323 </TableRow>
324
325 <TableRow
326 android:layout_width="fill_parent"
327 android:layout_height="wrap_content">
328
329 <TextView
330 android:layout_width="wrap_content"
331 android:layout_height="wrap_content"
332 android:ellipsize="end"
333 android:singleLine="true"
334 android:text="@string/server_info_roster_version"
335 android:textColor="?attr/color_text_primary"
336 android:textSize="?attr/TextSizeBody"/>
337
338 <TextView
339 android:id="@+id/server_info_roster_version"
340 android:layout_width="wrap_content"
341 android:layout_height="wrap_content"
342 android:layout_gravity="right"
343 android:paddingLeft="4dp"
344 android:textColor="?attr/color_text_primary"
345 android:textSize="?attr/TextSizeBody"
346 tools:ignore="RtlHardcoded"/>
347 </TableRow>
348
349 <TableRow
350 android:layout_width="fill_parent"
351 android:layout_height="wrap_content">
352
353 <TextView
354 android:layout_width="wrap_content"
355 android:layout_height="wrap_content"
356 android:ellipsize="end"
357 android:singleLine="true"
358 android:text="@string/server_info_carbon_messages"
359 android:textColor="?attr/color_text_primary"
360 android:textSize="?attr/TextSizeBody"/>
361
362 <TextView
363 android:id="@+id/server_info_carbons"
364 android:layout_width="wrap_content"
365 android:layout_height="wrap_content"
366 android:layout_gravity="right"
367 android:paddingLeft="4dp"
368 android:textColor="?attr/color_text_primary"
369 android:textSize="?attr/TextSizeBody"
370 tools:ignore="RtlHardcoded"/>
371 </TableRow>
372
373 <TableRow
374 android:layout_width="fill_parent"
375 android:layout_height="wrap_content">
376
377 <TextView
378 android:layout_width="wrap_content"
379 android:layout_height="wrap_content"
380 android:ellipsize="end"
381 android:singleLine="true"
382 android:text="@string/server_info_mam"
383 android:textColor="?attr/color_text_primary"
384 android:textSize="?attr/TextSizeBody"/>
385
386 <TextView
387 android:id="@+id/server_info_mam"
388 android:layout_width="wrap_content"
389 android:layout_height="wrap_content"
390 android:layout_gravity="right"
391 android:paddingLeft="4dp"
392 android:textColor="?attr/color_text_primary"
393 android:textSize="?attr/TextSizeBody"
394 tools:ignore="RtlHardcoded"/>
395 </TableRow>
396
397 <TableRow
398 android:layout_width="fill_parent"
399 android:layout_height="wrap_content">
400
401 <TextView
402 android:layout_width="wrap_content"
403 android:layout_height="wrap_content"
404 android:ellipsize="end"
405 android:singleLine="true"
406 android:text="@string/server_info_csi"
407 android:textColor="?attr/color_text_primary"
408 android:textSize="?attr/TextSizeBody"/>
409
410 <TextView
411 android:id="@+id/server_info_csi"
412 android:layout_width="wrap_content"
413 android:layout_height="wrap_content"
414 android:layout_gravity="right"
415 android:paddingLeft="4dp"
416 android:textColor="?attr/color_text_primary"
417 android:textSize="?attr/TextSizeBody"
418 tools:ignore="RtlHardcoded"/>
419 </TableRow>
420
421 <TableRow
422 android:id="@+id/push_row"
423 android:layout_width="fill_parent"
424 android:layout_height="wrap_content">
425
426 <TextView
427 android:layout_width="wrap_content"
428 android:layout_height="wrap_content"
429 android:ellipsize="end"
430 android:singleLine="true"
431 android:text="@string/server_info_push"
432 android:textColor="?attr/color_text_primary"
433 android:textSize="?attr/TextSizeBody"/>
434
435 <TextView
436 android:id="@+id/server_info_push"
437 android:layout_width="wrap_content"
438 android:layout_height="wrap_content"
439 android:layout_gravity="right"
440 android:paddingLeft="4dp"
441 android:textColor="?attr/color_text_primary"
442 android:textSize="?attr/TextSizeBody"/>
443 </TableRow>
444
445 <TableRow
446 android:layout_width="fill_parent"
447 android:layout_height="wrap_content">
448
449 <TextView
450 android:layout_width="wrap_content"
451 android:layout_height="wrap_content"
452 android:ellipsize="end"
453 android:singleLine="true"
454 android:text="@string/server_info_http_upload"
455 android:textColor="?attr/color_text_primary"
456 android:textSize="?attr/TextSizeBody"/>
457
458 <TextView
459 android:id="@+id/server_info_http_upload"
460 android:layout_width="wrap_content"
461 android:layout_height="wrap_content"
462 android:layout_gravity="right"
463 android:paddingLeft="4dp"
464 android:textColor="?attr/color_text_primary"
465 android:textSize="?attr/TextSizeBody"/>
466 </TableRow>
467 </TableLayout>
468
469 <RelativeLayout
470 android:id="@+id/pgp_fingerprint_box"
471 android:layout_width="wrap_content"
472 android:layout_height="match_parent"
473 android:layout_marginTop="32dp">
474
475 <LinearLayout
476 android:layout_width="wrap_content"
477 android:layout_height="wrap_content"
478 android:layout_alignParentLeft="true"
479 android:layout_centerVertical="true"
480 android:layout_toLeftOf="@+id/action_delete_pgp"
481 android:orientation="vertical">
482
483 <TextView
484 android:id="@+id/pgp_fingerprint"
485 android:layout_width="wrap_content"
486 android:layout_height="wrap_content"
487 android:fontFamily="monospace"
488 android:textColor="?attr/color_text_primary"
489 android:textSize="?attr/TextSizeBody"
490 android:typeface="monospace"/>
491
492 <TextView
493 android:id="@+id/pgp_fingerprint_desc"
494 android:layout_width="wrap_content"
495 android:layout_height="wrap_content"
496 android:text="@string/openpgp_key_id"
497 android:textColor="?attr/color_text_secondary"
498 android:textSize="?attr/TextSizeInfo"/>
499 </LinearLayout>
500
501 <ImageButton
502 android:id="@+id/action_delete_pgp"
503 android:layout_width="wrap_content"
504 android:layout_height="wrap_content"
505 android:layout_alignParentRight="true"
506 android:layout_centerVertical="true"
507 android:alpha="?attr/icon_alpha"
508 android:background="?attr/selectableItemBackgroundBorderless"
509 android:padding="@dimen/image_button_padding"
510 android:src="?attr/icon_remove"
511 android:visibility="visible"/>
512 </RelativeLayout>
513
514 <RelativeLayout
515 android:id="@+id/axolotl_fingerprint_box"
516 android:layout_width="wrap_content"
517 android:layout_height="match_parent"
518 android:layout_marginTop="24dp">
519
520 <LinearLayout
521 android:layout_width="wrap_content"
522 android:layout_height="wrap_content"
523 android:layout_alignParentLeft="true"
524 android:layout_centerVertical="true"
525 android:layout_toLeftOf="@+id/axolotl_actions"
526 android:orientation="vertical">
527
528 <TextView
529 android:id="@+id/axolotl_fingerprint"
530 android:layout_width="wrap_content"
531 android:layout_height="wrap_content"
532 android:fontFamily="monospace"
533 android:textColor="?attr/color_text_primary"
534 android:textSize="?attr/TextSizeBody"
535 android:typeface="monospace"/>
536
537 <TextView
538 android:id="@+id/own_fingerprint_desc"
539 android:layout_width="wrap_content"
540 android:layout_height="wrap_content"
541 android:text="@string/omemo_fingerprint"
542 android:textColor="?attr/color_text_secondary"
543 android:textSize="?attr/TextSizeInfo"/>
544 </LinearLayout>
545
546 <LinearLayout
547 android:id="@+id/axolotl_actions"
548 android:layout_width="wrap_content"
549 android:layout_height="wrap_content"
550 android:layout_alignParentRight="true"
551 android:layout_centerVertical="true"
552 android:orientation="vertical">
553
554 <ImageButton
555 android:id="@+id/action_copy_axolotl_to_clipboard"
556 android:layout_width="wrap_content"
557 android:layout_height="wrap_content"
558 android:alpha="?attr/icon_alpha"
559 android:background="?attr/selectableItemBackgroundBorderless"
560 android:contentDescription="@string/copy_omemo_clipboard_description"
561 android:padding="@dimen/image_button_padding"
562 android:src="?attr/icon_copy"
563 android:visibility="visible"/>
564
565 <ImageButton
566 android:id="@+id/action_regenerate_axolotl_key"
567 android:layout_width="wrap_content"
568 android:layout_height="wrap_content"
569 android:alpha="?attr/icon_alpha"
570 android:background="?attr/selectableItemBackgroundBorderless"
571 android:contentDescription="@string/regenerate_omemo_key"
572 android:padding="@dimen/image_button_padding"
573 android:src="?attr/icon_refresh"
574 android:visibility="gone"/>
575
576 </LinearLayout>
577 </RelativeLayout>
578 </LinearLayout>
579 </android.support.v7.widget.CardView>
580
581 <android.support.v7.widget.CardView
582 android:id="@+id/other_device_keys_card"
583 android:layout_width="fill_parent"
584 android:layout_height="wrap_content"
585 android:layout_marginBottom="@dimen/activity_vertical_margin"
586 android:layout_marginLeft="@dimen/activity_horizontal_margin"
587 android:layout_marginRight="@dimen/activity_horizontal_margin"
588 android:layout_marginTop="@dimen/activity_vertical_margin"
589 android:visibility="gone">
590
591 <LinearLayout
592 android:layout_width="match_parent"
593 android:layout_height="wrap_content"
594 android:orientation="vertical"
595 android:padding="@dimen/card_padding_list">
596
597 <TextView
598 android:id="@+id/other_device_keys_title"
599 android:layout_width="wrap_content"
600 android:layout_height="wrap_content"
601 android:text="@string/other_devices"
602 android:textColor="?attr/color_text_primary"
603 android:textSize="?attr/TextSizeHeadline"
604 android:layout_margin="@dimen/list_padding"
605 android:textStyle="bold"/>
606
607 <LinearLayout
608 android:id="@+id/other_device_keys"
609 android:layout_width="fill_parent"
610 android:layout_height="wrap_content"
611 android:divider="?android:dividerHorizontal"
612 android:orientation="vertical"
613 android:showDividers="middle"></LinearLayout>
614
615 <Button
616 android:id="@+id/clear_devices"
617 style="?android:attr/borderlessButtonStyle"
618 android:layout_width="wrap_content"
619 android:layout_height="wrap_content"
620 android:layout_gravity="center_horizontal"
621 android:text="@string/clear_other_devices"
622 android:textColor="@color/accent"/>
623 </LinearLayout>
624 </android.support.v7.widget.CardView>
625 </LinearLayout>
626 </ScrollView>
627
628 <LinearLayout
629 android:id="@+id/button_bar"
630 android:layout_width="wrap_content"
631 android:layout_height="wrap_content"
632 android:layout_alignParentBottom="true"
633 android:layout_alignParentEnd="true"
634 android:layout_alignParentLeft="true"
635 android:layout_alignParentRight="true"
636 android:layout_alignParentStart="true">
637
638 <Button
639 android:id="@+id/cancel_button"
640 style="?android:attr/borderlessButtonStyle"
641 android:layout_width="0dp"
642 android:layout_height="wrap_content"
643 android:layout_weight="1"
644 android:text="@string/cancel"
645 android:textColor="?attr/color_text_primary"/>
646
647 <View
648 android:layout_width="1dp"
649 android:layout_height="fill_parent"
650 android:layout_marginBottom="7dp"
651 android:layout_marginTop="7dp"
652 android:background="?attr/divider"/>
653
654 <Button
655 android:id="@+id/save_button"
656 style="?android:attr/borderlessButtonStyle"
657 android:layout_width="0dp"
658 android:layout_height="wrap_content"
659 android:layout_weight="1"
660 android:enabled="false"
661 android:text="@string/save"
662 android:textColor="?attr/color_text_secondary"/>
663 </LinearLayout>
664
665 </RelativeLayout>
666</layout>