<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="?attr/actionBarSize" />

        </com.google.android.material.appbar.AppBarLayout>

        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_above="@+id/button_bar"
            android:layout_below="@id/app_bar_layout">

            <LinearLayout
                android:id="@+id/account_main_layout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">


                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/editor"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:layout_marginRight="@dimen/activity_horizontal_margin"
                    android:layout_marginBottom="@dimen/activity_vertical_margin">

                    <RelativeLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:padding="@dimen/card_padding_regular">

                        <com.makeramen.roundedimageview.RoundedImageView
                            android:id="@+id/avater"
                            android:layout_width="@dimen/avatar_on_details_screen_size"
                            android:layout_height="@dimen/avatar_on_details_screen_size"
                            android:layout_alignParentTop="true"
                            android:layout_marginEnd="@dimen/avatar_item_distance"
                            android:contentDescription="@string/account_image_description"
                            app:riv_corner_radius="8dp" />

                        <LinearLayout
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:layout_toEndOf="@+id/avater"
                            android:orientation="vertical">

                            <com.google.android.material.textfield.TextInputLayout
                                android:id="@+id/account_jid_layout"
                                style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:hint="@string/account_settings_jabber_id">

                                <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                    android:id="@+id/account_jid"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:imeOptions="actionNext"
                                    android:inputType="textEmailAddress"
                                    android:padding="16dp" />
                            </com.google.android.material.textfield.TextInputLayout>


                            <com.google.android.material.textfield.TextInputLayout
                                android:id="@+id/account_password_layout"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="4sp"
                                android:hint="@string/password"
                                app:endIconMode="password_toggle">

                                <eu.siacs.conversations.ui.widget.TextInputEditText
                                    android:id="@+id/account_password"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:inputType="textPassword" />
                            </com.google.android.material.textfield.TextInputLayout>

                            <LinearLayout
                                android:id="@+id/name_port"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="8sp"
                                android:orientation="horizontal"
                                android:weightSum="1">


                                <com.google.android.material.textfield.TextInputLayout
                                    android:id="@+id/hostname_layout"
                                    android:layout_width="0dp"
                                    android:layout_height="wrap_content"
                                    android:layout_marginEnd="4sp"
                                    android:layout_weight="0.7"
                                    android:hint="@string/account_settings_hostname">

                                    <EditText
                                        android:id="@+id/hostname"
                                        android:layout_width="fill_parent"
                                        android:layout_height="wrap_content"
                                        android:inputType="textWebEmailAddress" />
                                </com.google.android.material.textfield.TextInputLayout>


                                <com.google.android.material.textfield.TextInputLayout
                                    android:id="@+id/port_layout"
                                    android:layout_width="0dp"
                                    android:layout_height="wrap_content"
                                    android:layout_marginStart="4sp"
                                    android:layout_weight="0.3"
                                    android:hint="@string/account_settings_port">

                                    <EditText
                                        android:id="@+id/port"
                                        android:layout_width="match_parent"
                                        android:layout_height="match_parent"
                                        android:inputType="number"
                                        android:maxLength="5" />
                                </com.google.android.material.textfield.TextInputLayout>
                            </LinearLayout>

                            <CheckBox
                                android:id="@+id/account_register_new"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="8dp"
                                android:text="@string/register_account" />
                        </LinearLayout>
                    </RelativeLayout>
                </com.google.android.material.card.MaterialCardView>

                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/os_optimization"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:layout_marginRight="@dimen/activity_horizontal_margin"
                    android:layout_marginBottom="@dimen/activity_vertical_margin"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="vertical"
                            android:padding="@dimen/card_padding_regular">

                            <TextView
                                android:id="@+id/os_optimization_headline"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@string/battery_optimizations_enabled"
                                android:textAppearance="?textAppearanceTitleLarge" />

                            <TextView
                                android:id="@+id/os_optimization_body"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="8dp"
                                android:text="@string/battery_optimizations_enabled_explained"
                                android:textAppearance="?textAppearanceBodyMedium" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_gravity="end"
                            android:layout_marginHorizontal="16dp"
                            android:layout_marginBottom="16dp"
                            android:gravity="end">

                            <Button
                                android:id="@+id/os_optimization_disable"
                                style="@style/Widget.Material3.Button.TonalButton"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@string/disable" />
                        </LinearLayout>
                    </LinearLayout>
                </com.google.android.material.card.MaterialCardView>


                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/stats"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:layout_marginRight="@dimen/activity_horizontal_margin"
                    android:layout_marginBottom="@dimen/activity_vertical_margin"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="@dimen/card_padding_regular">

                        <TableLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:shrinkColumns="0"
                            android:stretchColumns="1">

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                tools:ignore="UselessParent">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_session_established"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/session_est"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                        </TableLayout>

                        <TableLayout
                            android:id="@+id/server_info_login_mechanism"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:shrinkColumns="0"
                            android:stretchColumns="1"
                            android:visibility="gone">

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_login_mechanism"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/login_mechanism"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                        </TableLayout>

                        <TableLayout
                            android:id="@+id/server_info_more"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:shrinkColumns="0"
                            android:stretchColumns="1"
                            android:visibility="gone">

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_pep"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_pep"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_blocking"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_blocking"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_stream_management"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_sm"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_external_service_discovery"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_external_service"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_roster_version"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_roster_version"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_carbon_messages"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_carbons"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_mam"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_mam"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_csi"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_csi"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium"
                                    tools:ignore="RtlHardcoded" />
                            </TableRow>

                            <TableRow
                                android:id="@+id/push_row"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_push"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_push"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_http_upload"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_http_upload"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_bind2"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_bind2"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                            <TableRow
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content">

                                <TextView
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:ellipsize="end"
                                    android:singleLine="true"
                                    android:text="@string/server_info_sasl2"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/server_info_sasl2"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="end"
                                    android:textAppearance="?textAppearanceBodyMedium" />
                            </TableRow>

                        </TableLayout>

                        <RelativeLayout
                            android:id="@+id/your_name_box"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_marginTop="12dp">

                            <LinearLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:layout_centerVertical="true"
                                android:layout_toStartOf="@+id/action_edit_your_name"
                                android:orientation="vertical">

                                <TextView
                                    android:id="@+id/your_name"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/no_name_set_instructions"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/your_name_desc"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/your_name"
                                    android:textAppearance="?textAppearanceLabelMedium" />
                            </LinearLayout>

                            <ImageButton
                                android:id="@+id/action_edit_your_name"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:contentDescription="@string/edit_nick"
                                android:padding="@dimen/image_button_padding"
                                android:src="@drawable/ic_edit_24dp"
                                android:visibility="visible" />
                        </RelativeLayout>

                        <RelativeLayout
                            android:id="@+id/pgp_fingerprint_box"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_marginTop="12dp">

                            <LinearLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:layout_centerVertical="true"
                                android:layout_toStartOf="@+id/action_delete_pgp"
                                android:orientation="vertical">

                                <TextView
                                    android:id="@+id/pgp_fingerprint"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:fontFamily="monospace"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/pgp_fingerprint_desc"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/openpgp_key_id"
                                    android:textAppearance="?textAppearanceLabelMedium" />
                            </LinearLayout>

                            <ImageButton
                                android:id="@+id/action_delete_pgp"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:contentDescription="@string/delete_pgp_key"
                                android:padding="@dimen/image_button_padding"
                                android:src="@drawable/ic_delete_24dp"
                                android:visibility="visible" />
                        </RelativeLayout>

                        <RelativeLayout
                            android:id="@+id/axolotl_fingerprint_box"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_marginTop="12dp">

                            <LinearLayout
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:layout_centerVertical="true"
                                android:layout_toStartOf="@+id/axolotl_actions"
                                android:orientation="vertical">

                                <TextView
                                    android:id="@+id/axolotl_fingerprint"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:fontFamily="monospace"
                                    android:textAppearance="?textAppearanceBodyMedium" />

                                <TextView
                                    android:id="@+id/own_fingerprint_desc"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:textAppearance="?textAppearanceLabelMedium" />
                            </LinearLayout>

                            <LinearLayout
                                android:id="@+id/axolotl_actions"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentEnd="true"
                                android:layout_centerVertical="true"
                                android:orientation="vertical">

                                <ImageButton
                                    android:id="@+id/show_qr_code_button"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:background="?attr/selectableItemBackgroundBorderless"
                                    android:contentDescription="@string/show_qr_code"
                                    android:padding="@dimen/image_button_padding"
                                    android:src="@drawable/ic_qr_code_24dp"
                                    android:visibility="visible" />

                                <ImageButton
                                    android:id="@+id/action_regenerate_axolotl_key"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:background="?attr/selectableItemBackgroundBorderless"
                                    android:contentDescription="@string/regenerate_omemo_key"
                                    android:padding="@dimen/image_button_padding"
                                    android:src="@drawable/ic_refresh_24dp"
                                    android:visibility="gone" />

                            </LinearLayout>
                        </RelativeLayout>
                    </LinearLayout>
                </com.google.android.material.card.MaterialCardView>

                <com.google.android.material.card.MaterialCardView
                    android:id="@+id/other_device_keys_card"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/activity_horizontal_margin"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:layout_marginRight="@dimen/activity_horizontal_margin"
                    android:layout_marginBottom="@dimen/activity_vertical_margin"
                    android:visibility="gone"
                    tools:visibility="visible">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="vertical"
                            android:padding="@dimen/card_padding_list">

                            <TextView
                                android:id="@+id/other_device_keys_title"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_margin="@dimen/list_padding"
                                android:text="@string/other_devices"
                                android:textAppearance="?textAppearanceTitleLarge" />

                            <LinearLayout
                                android:id="@+id/other_device_keys"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:orientation="vertical" />
                        </LinearLayout>

                        <LinearLayout
                            android:id="@+id/unverified_warning"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:paddingHorizontal="@dimen/card_padding_list">

                            <!-- Consider using a warning color here. if we do this then contact details activity has the same warning -->
                            <TextView
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginHorizontal="@dimen/list_padding"
                                android:text="@string/unverified_devices"
                                android:textAppearance="?textAppearanceBodyMedium"
                                android:textColor="?colorOnSurfaceVariant" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:layout_marginTop="8dp"
                            android:orientation="horizontal">


                            <Button
                                android:id="@+id/scan_button"
                                style="@style/Widget.Material3.Button.TextButton"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:minWidth="0dp"
                                android:paddingLeft="16dp"
                                android:paddingRight="16dp"
                                android:text="@string/scan_qr_code" />

                            <Button
                                android:id="@+id/clear_devices"
                                style="@style/Widget.Material3.Button.TextButton"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:minWidth="0dp"
                                android:paddingLeft="16dp"
                                android:paddingRight="16dp"
                                android:text="@string/clear_other_devices" />
                        </LinearLayout>
                    </LinearLayout>

                </com.google.android.material.card.MaterialCardView>
            </LinearLayout>
        </ScrollView>

        <RelativeLayout
            android:id="@+id/button_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:paddingHorizontal="16dp"
            android:paddingVertical="8dp">

            <Button
                android:id="@+id/cancel_button"
                style="@style/Widget.Material3.Button.TextButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_centerInParent="true"
                android:text="@string/cancel" />


            <Button
                android:id="@+id/save_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerInParent="true"
                android:enabled="false"
                android:text="@string/save" />
        </RelativeLayout>

    </RelativeLayout>
</layout>
