activity_edit_account.xml

  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
 10        <com.google.android.material.appbar.AppBarLayout
 11            android:id="@+id/app_bar_layout"
 12            android:layout_width="match_parent"
 13            android:layout_height="wrap_content">
 14
 15            <com.google.android.material.appbar.MaterialToolbar
 16                android:id="@+id/toolbar"
 17                android:layout_width="match_parent"
 18                android:layout_height="wrap_content"
 19                android:minHeight="?attr/actionBarSize" />
 20
 21        </com.google.android.material.appbar.AppBarLayout>
 22
 23        <ScrollView
 24            android:layout_width="fill_parent"
 25            android:layout_height="wrap_content"
 26            android:layout_above="@+id/button_bar"
 27            android:layout_below="@id/app_bar_layout">
 28
 29            <LinearLayout
 30                android:id="@+id/account_main_layout"
 31                android:layout_width="match_parent"
 32                android:layout_height="wrap_content"
 33                android:orientation="vertical">
 34
 35
 36                <com.google.android.material.card.MaterialCardView
 37                    android:id="@+id/editor"
 38                    android:layout_width="fill_parent"
 39                    android:layout_height="wrap_content"
 40                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
 41                    android:layout_marginTop="@dimen/activity_vertical_margin"
 42                    android:layout_marginRight="@dimen/activity_horizontal_margin"
 43                    android:layout_marginBottom="@dimen/activity_vertical_margin">
 44
 45                    <RelativeLayout
 46                        android:layout_width="match_parent"
 47                        android:layout_height="wrap_content"
 48                        android:padding="@dimen/card_padding_regular">
 49
 50                        <com.google.android.material.imageview.ShapeableImageView
 51                            android:id="@+id/avater"
 52                            android:layout_width="@dimen/avatar_on_details_screen_size"
 53                            android:layout_height="@dimen/avatar_on_details_screen_size"
 54                            android:layout_alignParentTop="true"
 55                            android:layout_marginEnd="@dimen/avatar_item_distance"
 56                            android:contentDescription="@string/account_image_description"
 57                            app:shapeAppearance="@style/ShapeAppearanceOverlay.Photo" />
 58
 59                        <LinearLayout
 60                            android:layout_width="fill_parent"
 61                            android:layout_height="wrap_content"
 62                            android:layout_toEndOf="@+id/avater"
 63                            android:orientation="vertical">
 64
 65                            <com.google.android.material.textfield.TextInputLayout
 66                                android:id="@+id/account_jid_layout"
 67                                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
 68                                android:layout_width="match_parent"
 69                                android:layout_height="wrap_content"
 70                                android:hint="@string/account_settings_jabber_id">
 71
 72                                <com.google.android.material.textfield.MaterialAutoCompleteTextView
 73                                    android:id="@+id/account_jid"
 74                                    android:layout_width="match_parent"
 75                                    android:layout_height="wrap_content"
 76                                    android:imeOptions="actionNext"
 77                                    android:inputType="textEmailAddress"
 78                                    android:padding="16dp" />
 79                            </com.google.android.material.textfield.TextInputLayout>
 80
 81
 82                            <com.google.android.material.textfield.TextInputLayout
 83                                android:id="@+id/account_password_layout"
 84                                android:layout_width="match_parent"
 85                                android:layout_height="wrap_content"
 86                                android:layout_marginTop="4sp"
 87                                android:hint="@string/password"
 88                                app:endIconMode="password_toggle">
 89
 90                                <eu.siacs.conversations.ui.widget.TextInputEditText
 91                                    android:id="@+id/account_password"
 92                                    android:layout_width="match_parent"
 93                                    android:layout_height="wrap_content"
 94                                    android:inputType="textPassword" />
 95                            </com.google.android.material.textfield.TextInputLayout>
 96
 97                            <LinearLayout
 98                                android:id="@+id/name_port"
 99                                android:layout_width="fill_parent"
100                                android:layout_height="wrap_content"
101                                android:layout_marginTop="8sp"
102                                android:orientation="horizontal"
103                                android:weightSum="1">
104
105
106                                <com.google.android.material.textfield.TextInputLayout
107                                    android:id="@+id/hostname_layout"
108                                    android:layout_width="0dp"
109                                    android:layout_height="wrap_content"
110                                    android:layout_marginEnd="4sp"
111                                    android:layout_weight="0.7"
112                                    android:hint="@string/account_settings_hostname">
113
114                                    <EditText
115                                        android:id="@+id/hostname"
116                                        android:layout_width="fill_parent"
117                                        android:layout_height="wrap_content"
118                                        android:inputType="textWebEmailAddress" />
119                                </com.google.android.material.textfield.TextInputLayout>
120
121
122                                <com.google.android.material.textfield.TextInputLayout
123                                    android:id="@+id/port_layout"
124                                    android:layout_width="0dp"
125                                    android:layout_height="wrap_content"
126                                    android:layout_marginStart="4sp"
127                                    android:layout_weight="0.3"
128                                    android:hint="@string/account_settings_port">
129
130                                    <EditText
131                                        android:id="@+id/port"
132                                        android:layout_width="match_parent"
133                                        android:layout_height="match_parent"
134                                        android:inputType="number"
135                                        android:maxLength="5" />
136                                </com.google.android.material.textfield.TextInputLayout>
137                            </LinearLayout>
138
139                            <CheckBox
140                                android:id="@+id/account_register_new"
141                                android:layout_width="wrap_content"
142                                android:layout_height="wrap_content"
143                                android:layout_marginTop="8dp"
144                                android:text="@string/register_account" />
145                        </LinearLayout>
146                    </RelativeLayout>
147                </com.google.android.material.card.MaterialCardView>
148
149                <com.google.android.material.card.MaterialCardView
150                    android:id="@+id/os_optimization"
151                    android:layout_width="fill_parent"
152                    android:layout_height="wrap_content"
153                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
154                    android:layout_marginTop="@dimen/activity_vertical_margin"
155                    android:layout_marginRight="@dimen/activity_horizontal_margin"
156                    android:layout_marginBottom="@dimen/activity_vertical_margin"
157                    android:visibility="gone"
158                    tools:visibility="visible">
159
160                    <LinearLayout
161                        android:layout_width="match_parent"
162                        android:layout_height="wrap_content"
163                        android:orientation="vertical">
164
165                        <LinearLayout
166                            android:layout_width="match_parent"
167                            android:layout_height="wrap_content"
168                            android:orientation="vertical"
169                            android:padding="@dimen/card_padding_regular">
170
171                            <TextView
172                                android:id="@+id/os_optimization_headline"
173                                android:layout_width="wrap_content"
174                                android:layout_height="wrap_content"
175                                android:text="@string/battery_optimizations_enabled"
176                                android:textAppearance="?textAppearanceTitleLarge" />
177
178                            <TextView
179                                android:id="@+id/os_optimization_body"
180                                android:layout_width="wrap_content"
181                                android:layout_height="wrap_content"
182                                android:layout_marginTop="8dp"
183                                android:text="@string/battery_optimizations_enabled_explained"
184                                android:textAppearance="?textAppearanceBodyMedium" />
185                        </LinearLayout>
186
187                        <LinearLayout
188                            android:layout_width="match_parent"
189                            android:layout_height="wrap_content"
190                            android:layout_gravity="end"
191                            android:layout_marginHorizontal="16dp"
192                            android:layout_marginBottom="16dp"
193                            android:gravity="end">
194
195                            <Button
196                                android:id="@+id/os_optimization_disable"
197                                style="@style/Widget.Material3.Button.TonalButton"
198                                android:layout_width="wrap_content"
199                                android:layout_height="wrap_content"
200                                android:text="@string/disable" />
201                        </LinearLayout>
202                    </LinearLayout>
203                </com.google.android.material.card.MaterialCardView>
204
205
206                <com.google.android.material.card.MaterialCardView
207                    android:id="@+id/stats"
208                    android:layout_width="fill_parent"
209                    android:layout_height="fill_parent"
210                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
211                    android:layout_marginTop="@dimen/activity_vertical_margin"
212                    android:layout_marginRight="@dimen/activity_horizontal_margin"
213                    android:layout_marginBottom="@dimen/activity_vertical_margin"
214                    android:visibility="gone"
215                    tools:visibility="visible">
216
217                    <LinearLayout
218                        android:layout_width="match_parent"
219                        android:layout_height="wrap_content"
220                        android:orientation="vertical"
221                        android:padding="@dimen/card_padding_regular">
222
223                        <TableLayout
224                            android:layout_width="match_parent"
225                            android:layout_height="wrap_content"
226                            android:shrinkColumns="0"
227                            android:stretchColumns="1">
228
229                            <TableRow
230                                android:layout_width="fill_parent"
231                                android:layout_height="wrap_content"
232                                tools:ignore="UselessParent">
233
234                                <TextView
235                                    android:layout_width="wrap_content"
236                                    android:layout_height="wrap_content"
237                                    android:ellipsize="end"
238                                    android:singleLine="true"
239                                    android:text="@string/server_info_session_established"
240                                    android:textAppearance="?textAppearanceBodyMedium" />
241
242                                <TextView
243                                    android:id="@+id/session_est"
244                                    android:layout_width="wrap_content"
245                                    android:layout_height="wrap_content"
246                                    android:layout_gravity="end"
247                                    android:textAppearance="?textAppearanceBodyMedium" />
248                            </TableRow>
249
250                        </TableLayout>
251
252                        <TableLayout
253                            android:id="@+id/server_info_login_mechanism"
254                            android:layout_width="match_parent"
255                            android:layout_height="wrap_content"
256                            android:shrinkColumns="0"
257                            android:stretchColumns="1"
258                            android:visibility="gone">
259
260                            <TableRow
261                                android:layout_width="fill_parent"
262                                android:layout_height="wrap_content">
263
264                                <TextView
265                                    android:layout_width="wrap_content"
266                                    android:layout_height="wrap_content"
267                                    android:ellipsize="end"
268                                    android:singleLine="true"
269                                    android:text="@string/server_info_login_mechanism"
270                                    android:textAppearance="?textAppearanceBodyMedium" />
271
272                                <TextView
273                                    android:id="@+id/login_mechanism"
274                                    android:layout_width="wrap_content"
275                                    android:layout_height="wrap_content"
276                                    android:layout_gravity="end"
277                                    android:textAppearance="?textAppearanceBodyMedium" />
278                            </TableRow>
279
280                        </TableLayout>
281
282                        <TableLayout
283                            android:id="@+id/server_info_more"
284                            android:layout_width="match_parent"
285                            android:layout_height="wrap_content"
286                            android:shrinkColumns="0"
287                            android:stretchColumns="1"
288                            android:visibility="gone">
289
290                            <TableRow
291                                android:layout_width="fill_parent"
292                                android:layout_height="wrap_content">
293
294                                <TextView
295                                    android:layout_width="wrap_content"
296                                    android:layout_height="wrap_content"
297                                    android:ellipsize="end"
298                                    android:singleLine="true"
299                                    android:text="@string/server_info_pep"
300                                    android:textAppearance="?textAppearanceBodyMedium" />
301
302                                <TextView
303                                    android:id="@+id/server_info_pep"
304                                    android:layout_width="wrap_content"
305                                    android:layout_height="wrap_content"
306                                    android:layout_gravity="end"
307                                    android:textAppearance="?textAppearanceBodyMedium"
308                                    tools:ignore="RtlHardcoded" />
309                            </TableRow>
310
311                            <TableRow
312                                android:layout_width="fill_parent"
313                                android:layout_height="wrap_content">
314
315                                <TextView
316                                    android:layout_width="wrap_content"
317                                    android:layout_height="wrap_content"
318                                    android:ellipsize="end"
319                                    android:singleLine="true"
320                                    android:text="@string/server_info_blocking"
321                                    android:textAppearance="?textAppearanceBodyMedium" />
322
323                                <TextView
324                                    android:id="@+id/server_info_blocking"
325                                    android:layout_width="wrap_content"
326                                    android:layout_height="wrap_content"
327                                    android:layout_gravity="end"
328                                    android:textAppearance="?textAppearanceBodyMedium"
329                                    tools:ignore="RtlHardcoded" />
330                            </TableRow>
331
332                            <TableRow
333                                android:layout_width="fill_parent"
334                                android:layout_height="wrap_content">
335
336                                <TextView
337                                    android:layout_width="wrap_content"
338                                    android:layout_height="wrap_content"
339                                    android:ellipsize="end"
340                                    android:singleLine="true"
341                                    android:text="@string/server_info_stream_management"
342                                    android:textAppearance="?textAppearanceBodyMedium" />
343
344                                <TextView
345                                    android:id="@+id/server_info_sm"
346                                    android:layout_width="wrap_content"
347                                    android:layout_height="wrap_content"
348                                    android:layout_gravity="end"
349                                    android:textAppearance="?textAppearanceBodyMedium"
350                                    tools:ignore="RtlHardcoded" />
351                            </TableRow>
352
353                            <TableRow
354                                android:layout_width="fill_parent"
355                                android:layout_height="wrap_content">
356
357                                <TextView
358                                    android:layout_width="wrap_content"
359                                    android:layout_height="wrap_content"
360                                    android:ellipsize="end"
361                                    android:singleLine="true"
362                                    android:text="@string/server_info_external_service_discovery"
363                                    android:textAppearance="?textAppearanceBodyMedium" />
364
365                                <TextView
366                                    android:id="@+id/server_info_external_service"
367                                    android:layout_width="wrap_content"
368                                    android:layout_height="wrap_content"
369                                    android:layout_gravity="end"
370                                    android:textAppearance="?textAppearanceBodyMedium"
371                                    tools:ignore="RtlHardcoded" />
372                            </TableRow>
373
374                            <TableRow
375                                android:layout_width="fill_parent"
376                                android:layout_height="wrap_content">
377
378                                <TextView
379                                    android:layout_width="wrap_content"
380                                    android:layout_height="wrap_content"
381                                    android:ellipsize="end"
382                                    android:singleLine="true"
383                                    android:text="@string/server_info_roster_version"
384                                    android:textAppearance="?textAppearanceBodyMedium" />
385
386                                <TextView
387                                    android:id="@+id/server_info_roster_version"
388                                    android:layout_width="wrap_content"
389                                    android:layout_height="wrap_content"
390                                    android:layout_gravity="end"
391                                    android:textAppearance="?textAppearanceBodyMedium"
392                                    tools:ignore="RtlHardcoded" />
393                            </TableRow>
394
395                            <TableRow
396                                android:layout_width="fill_parent"
397                                android:layout_height="wrap_content">
398
399                                <TextView
400                                    android:layout_width="wrap_content"
401                                    android:layout_height="wrap_content"
402                                    android:ellipsize="end"
403                                    android:singleLine="true"
404                                    android:text="@string/server_info_carbon_messages"
405                                    android:textAppearance="?textAppearanceBodyMedium" />
406
407                                <TextView
408                                    android:id="@+id/server_info_carbons"
409                                    android:layout_width="wrap_content"
410                                    android:layout_height="wrap_content"
411                                    android:layout_gravity="end"
412                                    android:textAppearance="?textAppearanceBodyMedium"
413                                    tools:ignore="RtlHardcoded" />
414                            </TableRow>
415
416                            <TableRow
417                                android:layout_width="fill_parent"
418                                android:layout_height="wrap_content">
419
420                                <TextView
421                                    android:layout_width="wrap_content"
422                                    android:layout_height="wrap_content"
423                                    android:ellipsize="end"
424                                    android:singleLine="true"
425                                    android:text="@string/server_info_mam"
426                                    android:textAppearance="?textAppearanceBodyMedium" />
427
428                                <TextView
429                                    android:id="@+id/server_info_mam"
430                                    android:layout_width="wrap_content"
431                                    android:layout_height="wrap_content"
432                                    android:layout_gravity="end"
433                                    android:textAppearance="?textAppearanceBodyMedium"
434                                    tools:ignore="RtlHardcoded" />
435                            </TableRow>
436
437                            <TableRow
438                                android:layout_width="fill_parent"
439                                android:layout_height="wrap_content">
440
441                                <TextView
442                                    android:layout_width="wrap_content"
443                                    android:layout_height="wrap_content"
444                                    android:ellipsize="end"
445                                    android:singleLine="true"
446                                    android:text="@string/server_info_csi"
447                                    android:textAppearance="?textAppearanceBodyMedium" />
448
449                                <TextView
450                                    android:id="@+id/server_info_csi"
451                                    android:layout_width="wrap_content"
452                                    android:layout_height="wrap_content"
453                                    android:layout_gravity="end"
454                                    android:textAppearance="?textAppearanceBodyMedium"
455                                    tools:ignore="RtlHardcoded" />
456                            </TableRow>
457
458                            <TableRow
459                                android:id="@+id/push_row"
460                                android:layout_width="fill_parent"
461                                android:layout_height="wrap_content">
462
463                                <TextView
464                                    android:layout_width="wrap_content"
465                                    android:layout_height="wrap_content"
466                                    android:ellipsize="end"
467                                    android:singleLine="true"
468                                    android:text="@string/server_info_push"
469                                    android:textAppearance="?textAppearanceBodyMedium" />
470
471                                <TextView
472                                    android:id="@+id/server_info_push"
473                                    android:layout_width="wrap_content"
474                                    android:layout_height="wrap_content"
475                                    android:layout_gravity="end"
476                                    android:textAppearance="?textAppearanceBodyMedium" />
477                            </TableRow>
478
479                            <TableRow
480                                android:layout_width="fill_parent"
481                                android:layout_height="wrap_content">
482
483                                <TextView
484                                    android:layout_width="wrap_content"
485                                    android:layout_height="wrap_content"
486                                    android:ellipsize="end"
487                                    android:singleLine="true"
488                                    android:text="@string/server_info_http_upload"
489                                    android:textAppearance="?textAppearanceBodyMedium" />
490
491                                <TextView
492                                    android:id="@+id/server_info_http_upload"
493                                    android:layout_width="wrap_content"
494                                    android:layout_height="wrap_content"
495                                    android:layout_gravity="end"
496                                    android:textAppearance="?textAppearanceBodyMedium" />
497                            </TableRow>
498
499                            <TableRow
500                                android:layout_width="fill_parent"
501                                android:layout_height="wrap_content">
502
503                                <TextView
504                                    android:layout_width="wrap_content"
505                                    android:layout_height="wrap_content"
506                                    android:ellipsize="end"
507                                    android:singleLine="true"
508                                    android:text="@string/server_info_bind2"
509                                    android:textAppearance="?textAppearanceBodyMedium" />
510
511                                <TextView
512                                    android:id="@+id/server_info_bind2"
513                                    android:layout_width="wrap_content"
514                                    android:layout_height="wrap_content"
515                                    android:layout_gravity="end"
516                                    android:textAppearance="?textAppearanceBodyMedium" />
517                            </TableRow>
518
519                            <TableRow
520                                android:layout_width="fill_parent"
521                                android:layout_height="wrap_content">
522
523                                <TextView
524                                    android:layout_width="wrap_content"
525                                    android:layout_height="wrap_content"
526                                    android:ellipsize="end"
527                                    android:singleLine="true"
528                                    android:text="@string/server_info_sasl2"
529                                    android:textAppearance="?textAppearanceBodyMedium" />
530
531                                <TextView
532                                    android:id="@+id/server_info_sasl2"
533                                    android:layout_width="wrap_content"
534                                    android:layout_height="wrap_content"
535                                    android:layout_gravity="end"
536                                    android:textAppearance="?textAppearanceBodyMedium" />
537                            </TableRow>
538
539                        </TableLayout>
540
541                        <RelativeLayout
542                            android:id="@+id/verification_box"
543                            android:layout_width="wrap_content"
544                            android:layout_height="match_parent"
545                            android:layout_marginTop="12dp">
546
547                            <LinearLayout
548                                android:layout_width="wrap_content"
549                                android:layout_height="wrap_content"
550                                android:layout_alignParentStart="true"
551                                android:layout_centerVertical="true"
552                                android:layout_toLeftOf="@+id/verification_indicator"
553                                android:orientation="vertical">
554
555                                <TextView
556                                    android:id="@+id/verification_message"
557                                    android:layout_width="wrap_content"
558                                    android:layout_height="wrap_content"
559                                    android:text="Not DNSSEC Verified"
560                                    android:textAppearance="?textAppearanceBodyMedium" />
561                            </LinearLayout>
562
563                            <ImageView
564                                android:id="@+id/verification_indicator"
565                                android:layout_width="wrap_content"
566                                android:layout_height="wrap_content"
567                                android:layout_alignParentRight="true"
568                                android:layout_centerVertical="true"
569                                android:background="?attr/selectableItemBackgroundBorderless"
570                                android:padding="@dimen/image_button_padding"
571                                android:src="@drawable/shield_question"
572                                android:visibility="visible" />
573                        </RelativeLayout>
574
575                        <RelativeLayout
576                            android:id="@+id/your_name_box"
577                            android:layout_width="wrap_content"
578                            android:layout_height="match_parent"
579                            android:layout_marginTop="0dp">
580
581                            <LinearLayout
582                                android:layout_width="wrap_content"
583                                android:layout_height="wrap_content"
584                                android:layout_alignParentLeft="true"
585                                android:layout_centerVertical="true"
586                                android:layout_toStartOf="@+id/action_edit_your_name"
587                                android:orientation="vertical">
588
589                                <TextView
590                                    android:id="@+id/your_name"
591                                    android:layout_width="wrap_content"
592                                    android:layout_height="wrap_content"
593                                    android:text="@string/no_name_set_instructions"
594                                    android:textAppearance="?textAppearanceBodyMedium" />
595
596                                <TextView
597                                    android:id="@+id/your_name_desc"
598                                    android:layout_width="wrap_content"
599                                    android:layout_height="wrap_content"
600                                    android:text="@string/your_name"
601                                    android:textAppearance="?textAppearanceLabelMedium" />
602                            </LinearLayout>
603
604                            <ImageButton
605                                android:id="@+id/action_edit_your_name"
606                                android:layout_width="wrap_content"
607                                android:layout_height="wrap_content"
608                                android:layout_alignParentEnd="true"
609                                android:layout_centerVertical="true"
610                                android:background="?attr/selectableItemBackgroundBorderless"
611                                android:contentDescription="@string/edit_nick"
612                                android:padding="@dimen/image_button_padding"
613                                android:src="@drawable/ic_edit_24dp"
614                                android:visibility="visible" />
615                        </RelativeLayout>
616
617                        <RelativeLayout
618                            android:id="@+id/account_color_box"
619                            android:layout_width="wrap_content"
620                            android:layout_height="match_parent"
621                            android:layout_marginTop="12dp">
622
623                            <LinearLayout
624                                android:layout_width="wrap_content"
625                                android:layout_height="wrap_content"
626                                android:layout_alignParentLeft="true"
627                                android:layout_centerVertical="true"
628                                android:layout_toLeftOf="@+id/account_color_thumbnail"
629                                android:orientation="vertical">
630
631                                <TextView
632                                    android:layout_width="wrap_content"
633                                    android:layout_height="wrap_content"
634                                    android:text="Account Color"
635                                    android:textAppearance="?textAppearanceBodyMedium"/>
636
637
638                                <TextView
639                                    android:layout_width="wrap_content"
640                                    android:layout_height="wrap_content"
641                                    android:text="Used on conversation and contact lists, and notifications"
642                                    android:textAppearance="?textAppearanceBodyMedium"/>
643                            </LinearLayout>
644
645                            <FrameLayout
646                                android:id="@+id/account_color_thumbnail"
647                                android:layout_width="48dp"
648                                android:layout_height="48dp"
649                                android:background="@drawable/thumbnail_border"
650                                android:layout_alignParentRight="true"
651                                android:layout_centerVertical="true">
652
653                                <View
654                                    android:layout_margin="1dp"
655                                    android:id="@+id/colorPreview"
656                                    android:layout_width="fill_parent"
657                                    android:layout_height="fill_parent" />
658
659                            </FrameLayout>
660                        </RelativeLayout>
661
662                        <RelativeLayout
663                            android:id="@+id/quiet_hours_box"
664                            android:layout_width="wrap_content"
665                            android:layout_height="match_parent"
666                            android:layout_marginTop="12dp">
667
668                            <LinearLayout
669                                android:layout_width="wrap_content"
670                                android:layout_height="wrap_content"
671                                android:layout_alignParentLeft="true"
672                                android:layout_centerVertical="true"
673                                android:layout_toLeftOf="@+id/quiet_hours_enable"
674                                android:orientation="vertical">
675
676                                <TextView
677                                    android:layout_width="wrap_content"
678                                    android:layout_height="wrap_content"
679                                    android:text="@string/title_pref_enable_quiet_hours"
680                                    android:textAppearance="?textAppearanceBodyMedium"/>
681
682                                <TextView
683                                    android:layout_width="wrap_content"
684                                    android:layout_height="wrap_content"
685                                    android:text="@string/pref_quiet_hours_summary"
686                                    android:textAppearance="?textAppearanceBodyMedium"/>
687                            </LinearLayout>
688
689                            <androidx.appcompat.widget.SwitchCompat
690                                android:id="@+id/quiet_hours_enable"
691                                android:layout_width="wrap_content"
692                                android:layout_height="wrap_content"
693                                android:layout_alignParentRight="true"
694                                android:layout_centerVertical="true"
695                                android:background="?attr/selectableItemBackgroundBorderless"
696                                android:visibility="visible"/>
697                        </RelativeLayout>
698
699                        <RelativeLayout
700                            android:id="@+id/quiet_hours_start_box"
701                            android:visibility="gone"
702                            android:layout_width="wrap_content"
703                            android:layout_height="match_parent"
704                            android:layout_marginTop="12dp">
705
706                            <LinearLayout
707                                android:layout_width="wrap_content"
708                                android:layout_height="wrap_content"
709                                android:layout_alignParentLeft="true"
710                                android:layout_centerVertical="true"
711                                android:orientation="vertical">
712
713                                <TextView
714                                    android:layout_width="wrap_content"
715                                    android:layout_height="wrap_content"
716                                    android:text="@string/title_pref_quiet_hours_start_time"
717                                    android:textAppearance="?textAppearanceBodyMedium"/>
718
719                                <TextView
720                                    android:id="@+id/quiet_hours_start"
721                                    android:layout_width="wrap_content"
722                                    android:layout_height="wrap_content"
723                                    android:text=""
724                                    android:textAppearance="?textAppearanceBodyMedium"/>
725                            </LinearLayout>
726                        </RelativeLayout>
727
728                        <RelativeLayout
729                            android:id="@+id/quiet_hours_end_box"
730                            android:visibility="gone"
731                            android:layout_width="wrap_content"
732                            android:layout_height="match_parent"
733                            android:layout_marginTop="12dp">
734
735                            <LinearLayout
736                                android:layout_width="wrap_content"
737                                android:layout_height="wrap_content"
738                                android:layout_alignParentLeft="true"
739                                android:layout_centerVertical="true"
740                                android:orientation="vertical">
741
742                                <TextView
743                                    android:layout_width="wrap_content"
744                                    android:layout_height="wrap_content"
745                                    android:text="@string/title_pref_quiet_hours_end_time"
746                                    android:textAppearance="?textAppearanceBodyMedium"/>
747
748                                <TextView
749                                    android:id="@+id/quiet_hours_end"
750                                    android:layout_width="wrap_content"
751                                    android:layout_height="wrap_content"
752                                    android:text=""
753                                    android:textAppearance="?textAppearanceBodyMedium"/>
754                            </LinearLayout>
755                        </RelativeLayout>
756
757                        <RelativeLayout
758                            android:id="@+id/pgp_fingerprint_box"
759                            android:layout_width="wrap_content"
760                            android:layout_height="match_parent"
761                            android:layout_marginTop="12dp">
762
763                            <LinearLayout
764                                android:layout_width="wrap_content"
765                                android:layout_height="wrap_content"
766                                android:layout_alignParentStart="true"
767                                android:layout_centerVertical="true"
768                                android:layout_toStartOf="@+id/action_delete_pgp"
769                                android:orientation="vertical">
770
771                                <TextView
772                                    android:id="@+id/pgp_fingerprint"
773                                    android:layout_width="wrap_content"
774                                    android:layout_height="wrap_content"
775                                    android:fontFamily="monospace"
776                                    android:textAppearance="?textAppearanceBodyMedium" />
777
778                                <TextView
779                                    android:id="@+id/pgp_fingerprint_desc"
780                                    android:layout_width="wrap_content"
781                                    android:layout_height="wrap_content"
782                                    android:text="@string/openpgp_key_id"
783                                    android:textAppearance="?textAppearanceLabelMedium" />
784                            </LinearLayout>
785
786                            <ImageButton
787                                android:id="@+id/action_delete_pgp"
788                                android:layout_width="wrap_content"
789                                android:layout_height="wrap_content"
790                                android:layout_alignParentEnd="true"
791                                android:layout_centerVertical="true"
792                                android:background="?attr/selectableItemBackgroundBorderless"
793                                android:contentDescription="@string/delete_pgp_key"
794                                android:padding="@dimen/image_button_padding"
795                                android:src="@drawable/ic_delete_24dp"
796                                android:visibility="visible" />
797                        </RelativeLayout>
798
799                        <RelativeLayout
800                            android:id="@+id/axolotl_fingerprint_box"
801                            android:layout_width="wrap_content"
802                            android:layout_height="match_parent"
803                            android:layout_marginTop="12dp">
804
805                            <LinearLayout
806                                android:layout_width="wrap_content"
807                                android:layout_height="wrap_content"
808                                android:layout_alignParentStart="true"
809                                android:layout_centerVertical="true"
810                                android:layout_toStartOf="@+id/axolotl_actions"
811                                android:orientation="vertical">
812
813                                <TextView
814                                    android:id="@+id/axolotl_fingerprint"
815                                    android:layout_width="wrap_content"
816                                    android:layout_height="wrap_content"
817                                    android:fontFamily="monospace"
818                                    android:textAppearance="?textAppearanceBodyMedium" />
819
820                                <TextView
821                                    android:id="@+id/own_fingerprint_desc"
822                                    android:layout_width="wrap_content"
823                                    android:layout_height="wrap_content"
824                                    android:textAppearance="?textAppearanceLabelMedium" />
825                            </LinearLayout>
826
827                            <LinearLayout
828                                android:id="@+id/axolotl_actions"
829                                android:layout_width="wrap_content"
830                                android:layout_height="wrap_content"
831                                android:layout_alignParentEnd="true"
832                                android:layout_centerVertical="true"
833                                android:orientation="vertical">
834
835                                <ImageButton
836                                    android:id="@+id/show_qr_code_button"
837                                    android:layout_width="wrap_content"
838                                    android:layout_height="wrap_content"
839                                    android:background="?attr/selectableItemBackgroundBorderless"
840                                    android:contentDescription="@string/show_qr_code"
841                                    android:padding="@dimen/image_button_padding"
842                                    android:src="@drawable/ic_qr_code_24dp"
843                                    android:visibility="visible" />
844
845                                <ImageButton
846                                    android:id="@+id/action_regenerate_axolotl_key"
847                                    android:layout_width="wrap_content"
848                                    android:layout_height="wrap_content"
849                                    android:background="?attr/selectableItemBackgroundBorderless"
850                                    android:contentDescription="@string/regenerate_omemo_key"
851                                    android:padding="@dimen/image_button_padding"
852                                    android:src="@drawable/ic_refresh_24dp"
853                                    android:visibility="gone" />
854
855                            </LinearLayout>
856                        </RelativeLayout>
857                    </LinearLayout>
858                </com.google.android.material.card.MaterialCardView>
859
860                <com.google.android.material.card.MaterialCardView
861                    android:id="@+id/other_device_keys_card"
862                    android:layout_width="fill_parent"
863                    android:layout_height="wrap_content"
864                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
865                    android:layout_marginTop="@dimen/activity_vertical_margin"
866                    android:layout_marginRight="@dimen/activity_horizontal_margin"
867                    android:layout_marginBottom="@dimen/activity_vertical_margin"
868                    android:visibility="gone"
869                    tools:visibility="visible">
870
871                    <LinearLayout
872                        android:layout_width="match_parent"
873                        android:layout_height="wrap_content"
874                        android:orientation="vertical">
875
876                        <LinearLayout
877                            android:layout_width="match_parent"
878                            android:layout_height="wrap_content"
879                            android:orientation="vertical"
880                            android:padding="@dimen/card_padding_list">
881
882                            <TextView
883                                android:id="@+id/other_device_keys_title"
884                                android:layout_width="wrap_content"
885                                android:layout_height="wrap_content"
886                                android:layout_margin="@dimen/list_padding"
887                                android:text="@string/other_devices"
888                                android:textAppearance="?textAppearanceTitleLarge" />
889
890                            <LinearLayout
891                                android:id="@+id/other_device_keys"
892                                android:layout_width="fill_parent"
893                                android:layout_height="wrap_content"
894                                android:orientation="vertical" />
895                        </LinearLayout>
896
897                        <LinearLayout
898                            android:id="@+id/unverified_warning"
899                            android:layout_width="match_parent"
900                            android:layout_height="wrap_content"
901                            android:paddingHorizontal="@dimen/card_padding_list">
902
903                            <!-- Consider using a warning color here. if we do this then contact details activity has the same warning -->
904                            <TextView
905                                android:layout_width="wrap_content"
906                                android:layout_height="wrap_content"
907                                android:layout_marginHorizontal="@dimen/list_padding"
908                                android:text="@string/unverified_devices"
909                                android:textAppearance="?textAppearanceBodyMedium"
910                                android:textColor="?colorOnSurfaceVariant" />
911                        </LinearLayout>
912
913                        <LinearLayout
914                            android:layout_width="wrap_content"
915                            android:layout_height="match_parent"
916                            android:layout_marginTop="8dp"
917                            android:orientation="horizontal">
918
919
920                            <Button
921                                android:id="@+id/scan_button"
922                                style="@style/Widget.Material3.Button.TextButton"
923                                android:layout_width="wrap_content"
924                                android:layout_height="wrap_content"
925                                android:minWidth="0dp"
926                                android:paddingLeft="16dp"
927                                android:paddingRight="16dp"
928                                android:text="@string/scan_qr_code" />
929
930                            <Button
931                                android:id="@+id/clear_devices"
932                                style="@style/Widget.Material3.Button.TextButton"
933                                android:layout_width="wrap_content"
934                                android:layout_height="wrap_content"
935                                android:minWidth="0dp"
936                                android:paddingLeft="16dp"
937                                android:paddingRight="16dp"
938                                android:text="@string/clear_other_devices" />
939                        </LinearLayout>
940                    </LinearLayout>
941
942                </com.google.android.material.card.MaterialCardView>
943            </LinearLayout>
944        </ScrollView>
945
946        <RelativeLayout
947            android:id="@+id/button_bar"
948            android:layout_width="wrap_content"
949            android:layout_height="wrap_content"
950            android:layout_alignParentStart="true"
951            android:layout_alignParentEnd="true"
952            android:layout_alignParentBottom="true"
953            android:paddingHorizontal="16dp"
954            android:paddingVertical="8dp">
955
956            <Button
957                android:id="@+id/cancel_button"
958                style="@style/Widget.Material3.Button.TextButton"
959                android:layout_width="wrap_content"
960                android:layout_height="wrap_content"
961                android:layout_alignParentStart="true"
962                android:layout_centerInParent="true"
963                android:text="@string/cancel" />
964
965
966            <Button
967                android:id="@+id/save_button"
968                android:layout_width="wrap_content"
969                android:layout_height="wrap_content"
970                android:layout_alignParentEnd="true"
971                android:layout_centerInParent="true"
972                android:enabled="false"
973                android:text="@string/save" />
974        </RelativeLayout>
975
976    </RelativeLayout>
977</layout>