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:fontFamily="monospace"
485 android:textColor="?attr/color_text_primary"
486 android:textSize="?attr/TextSizeBody"
487 android:typeface="monospace"/>
488
489 <TextView
490 android:id="@+id/pgp_fingerprint_desc"
491 android:layout_width="wrap_content"
492 android:layout_height="wrap_content"
493 android:text="@string/openpgp_key_id"
494 android:textColor="?attr/color_text_secondary"
495 android:textSize="?attr/TextSizeInfo"/>
496 </LinearLayout>
497
498 <ImageButton
499 android:id="@+id/action_delete_pgp"
500 android:layout_width="wrap_content"
501 android:layout_height="wrap_content"
502 android:layout_alignParentRight="true"
503 android:layout_centerVertical="true"
504 android:alpha="?attr/icon_alpha"
505 android:background="?attr/selectableItemBackgroundBorderless"
506 android:padding="@dimen/image_button_padding"
507 android:src="?attr/icon_remove"
508 android:visibility="visible"/>
509 </RelativeLayout>
510
511 <RelativeLayout
512 android:id="@+id/axolotl_fingerprint_box"
513 android:layout_width="wrap_content"
514 android:layout_height="match_parent"
515 android:layout_marginTop="24dp">
516
517 <LinearLayout
518 android:layout_width="wrap_content"
519 android:layout_height="wrap_content"
520 android:layout_alignParentLeft="true"
521 android:layout_centerVertical="true"
522 android:layout_toLeftOf="@+id/axolotl_actions"
523 android:orientation="vertical">
524
525 <TextView
526 android:id="@+id/axolotl_fingerprint"
527 android:layout_width="wrap_content"
528 android:layout_height="wrap_content"
529 android:fontFamily="monospace"
530 android:textColor="?attr/color_text_primary"
531 android:textSize="?attr/TextSizeBody"
532 android:typeface="monospace"/>
533
534 <TextView
535 android:id="@+id/own_fingerprint_desc"
536 android:layout_width="wrap_content"
537 android:layout_height="wrap_content"
538 android:text="@string/omemo_fingerprint"
539 android:textColor="?attr/color_text_secondary"
540 android:textSize="?attr/TextSizeInfo"/>
541 </LinearLayout>
542
543 <LinearLayout
544 android:id="@+id/axolotl_actions"
545 android:layout_width="wrap_content"
546 android:layout_height="wrap_content"
547 android:layout_alignParentRight="true"
548 android:layout_centerVertical="true"
549 android:orientation="vertical">
550
551 <ImageButton
552 android:id="@+id/action_copy_axolotl_to_clipboard"
553 android:layout_width="wrap_content"
554 android:layout_height="wrap_content"
555 android:alpha="?attr/icon_alpha"
556 android:background="?attr/selectableItemBackgroundBorderless"
557 android:contentDescription="@string/copy_omemo_clipboard_description"
558 android:padding="@dimen/image_button_padding"
559 android:src="?attr/icon_copy"
560 android:visibility="visible"/>
561
562 <ImageButton
563 android:id="@+id/action_regenerate_axolotl_key"
564 android:layout_width="wrap_content"
565 android:layout_height="wrap_content"
566 android:alpha="?attr/icon_alpha"
567 android:background="?attr/selectableItemBackgroundBorderless"
568 android:contentDescription="@string/regenerate_omemo_key"
569 android:padding="@dimen/image_button_padding"
570 android:src="?attr/icon_refresh"
571 android:visibility="gone"/>
572
573 </LinearLayout>
574 </RelativeLayout>
575 </LinearLayout>
576 </android.support.v7.widget.CardView>
577
578 <android.support.v7.widget.CardView
579 android:id="@+id/other_device_keys_card"
580 android:layout_width="fill_parent"
581 android:layout_height="wrap_content"
582 android:layout_marginBottom="@dimen/activity_vertical_margin"
583 android:layout_marginLeft="@dimen/activity_horizontal_margin"
584 android:layout_marginRight="@dimen/activity_horizontal_margin"
585 android:layout_marginTop="@dimen/activity_vertical_margin"
586 android:visibility="gone">
587
588 <LinearLayout
589 android:layout_width="match_parent"
590 android:layout_height="wrap_content"
591 android:orientation="vertical"
592 android:padding="@dimen/card_padding_list">
593
594 <TextView
595 android:id="@+id/other_device_keys_title"
596 android:layout_width="wrap_content"
597 android:layout_height="wrap_content"
598 android:text="@string/other_devices"
599 android:textAppearance="@style/TextAppearance.AppCompat.Title"
600 android:layout_margin="@dimen/list_padding"/>
601
602 <LinearLayout
603 android:id="@+id/other_device_keys"
604 android:layout_width="fill_parent"
605 android:layout_height="wrap_content"
606 android:orientation="vertical"/>
607
608 <Button
609 android:id="@+id/clear_devices"
610 style="?android:attr/borderlessButtonStyle"
611 android:layout_width="wrap_content"
612 android:layout_height="wrap_content"
613 android:layout_gravity="center_horizontal"
614 android:text="@string/clear_other_devices"
615 android:textColor="@color/accent"/>
616 </LinearLayout>
617 </android.support.v7.widget.CardView>
618 </LinearLayout>
619 </ScrollView>
620
621 <LinearLayout
622 android:id="@+id/button_bar"
623 android:layout_width="wrap_content"
624 android:layout_height="wrap_content"
625 android:layout_alignParentBottom="true"
626 android:layout_alignParentEnd="true"
627 android:layout_alignParentLeft="true"
628 android:layout_alignParentRight="true"
629 android:layout_alignParentStart="true">
630
631 <Button
632 android:id="@+id/cancel_button"
633 style="?android:attr/borderlessButtonStyle"
634 android:layout_width="0dp"
635 android:layout_height="wrap_content"
636 android:layout_weight="1"
637 android:text="@string/cancel"
638 android:textColor="?attr/color_text_primary"/>
639
640 <View
641 android:layout_width="1dp"
642 android:layout_height="fill_parent"
643 android:layout_marginBottom="7dp"
644 android:layout_marginTop="7dp"
645 android:background="?attr/divider"/>
646
647 <Button
648 android:id="@+id/save_button"
649 style="?android:attr/borderlessButtonStyle"
650 android:layout_width="0dp"
651 android:layout_height="wrap_content"
652 android:layout_weight="1"
653 android:enabled="false"
654 android:text="@string/save"
655 android:textColor="?attr/color_text_secondary"/>
656 </LinearLayout>
657
658 </RelativeLayout>
659</layout>