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