<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".settings.ui.SettingsFragment">

    <include
        android:id="@+id/layout_app_bar"
        layout="@layout/app_bar"
        app:layout_constraintTop_toTopOf="parent" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/layout_app_bar"
        app:layout_constraintTop_toBottomOf="@+id/layout_app_bar">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/profile_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="5dp"
                android:paddingEnd="16dp"
                android:paddingBottom="5dp"
                app:layout_constraintTop_toTopOf="parent">

                <ImageView
                    android:id="@+id/image_avatar"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:background="@drawable/bg_border_user_details_avatar"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    tools:srcCompat="@tools:sample/avatars[6]" />

                <TextView
                    android:id="@+id/text_display_name"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:fontFamily="sans-serif-medium"
                    android:textColor="#DE000000"
                    android:textSize="14sp"
                    android:textStyle="normal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@+id/image_avatar"
                    app:layout_constraintTop_toTopOf="@+id/image_avatar"
                    tools:text="user.name" />

                <TextView
                    android:id="@+id/text_status"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:fontFamily="sans-serif"
                    android:textColor="#99000000"
                    android:textSize="14sp"
                    android:textStyle="normal"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@+id/image_avatar"
                    app:layout_constraintTop_toBottomOf="@+id/text_display_name"
                    tools:text="visible" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <TextView
                android:id="@+id/text_contact_us"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_contact_us"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/profile_container" />

            <TextView
                android:id="@+id/text_language"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_language"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_contact_us" />

            <TextView
                android:id="@+id/text_review_this_app"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_review_this_app"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_language" />

            <TextView
                android:id="@+id/text_share_this_app"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_share_this_app"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_review_this_app" />

            <TextView
                android:id="@+id/text_administration"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_administration"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_share_this_app"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/text_license"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_licence"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_administration" />

            <TextView
                android:id="@+id/text_app_version"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_app_version"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_license" />

            <TextView
                android:id="@+id/text_server_version"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@color/colorLightGrey"
                android:fontFamily="sans-serif-medium"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_server_version"
                android:textColor="#DE000000"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_app_version" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/send_analytics_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp"
                android:background="@color/colorLightGrey"
                android:paddingStart="16dp"
                android:paddingTop="5dp"
                android:paddingEnd="16dp"
                android:paddingBottom="5dp"
                app:layout_constraintTop_toBottomOf="@+id/text_server_version">

                <TextView
                    android:id="@+id/text_send_crash_report"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="sans-serif-medium"
                    android:text="@string/msg_send_analytics"
                    android:textColor="#DE000000"
                    android:textSize="16sp"
                    android:textStyle="normal"
                    app:layout_constraintEnd_toStartOf="@id/switch_analytics_tracking"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <Switch
                    android:id="@+id/switch_crash_report"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:checked="false"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="@+id/text_send_crash_report" />

                <TextView
                    android:id="@+id/text_send_crash_report_description"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:fontFamily="sans-serif"
                    android:text="@string/msg_send_analytics_tracking"
                    android:textColor="#99000000"
                    android:textSize="14sp"
                    android:textStyle="normal"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/text_send_crash_report" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <TextView
                android:id="@+id/text_logout"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_logout_from_rocket_chat"
                android:textColor="@color/colorRed"
                android:textSize="16sp"
                android:textStyle="normal"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/send_analytics_container" />

            <TextView
                android:id="@+id/text_delete_account"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:fontFamily="sans-serif-medium"
                android:foreground="?selectableItemBackground"
                android:paddingStart="16dp"
                android:paddingTop="8dp"
                android:paddingEnd="16dp"
                android:paddingBottom="8dp"
                android:text="@string/msg_delete_account"
                android:textColor="@color/colorRed"
                android:textSize="16sp"
                android:textStyle="normal"
                android:visibility="gone"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/text_logout"
                tools:visibility="visible" />

            <com.wang.avi.AVLoadingIndicatorView
                android:id="@+id/view_loading"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone"
                app:indicatorColor="@color/colorBlack"
                app:indicatorName="BallPulseIndicator"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:visibility="visible" />

        </androidx.constraintlayout.widget.ConstraintLayout>
    </ScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
