<?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">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/groupToolbar"
        style="@style/VectorToolbarStyle"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:elevation="4dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/groupToolbarAvatarImageView"
                android:layout_width="32dp"
                android:layout_height="32dp"
                android:contentDescription="@string/a11y_open_drawer"
                tools:src="@tools:sample/avatars" />

            <TextView
                android:id="@+id/groupToolbarTitleView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginEnd="32dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:textColor="?riotx_text_primary"
                android:textSize="20sp"
                android:textStyle="bold"
                tools:text="@tools:sample/lorem/random" />

        </LinearLayout>

    </androidx.appcompat.widget.Toolbar>

    <im.vector.app.features.sync.widget.SyncStateView
        android:id="@+id/syncStateView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/groupToolbar" />

    <im.vector.app.core.ui.views.KeysBackupBanner
        android:id="@+id/homeKeysBackupBanner"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="?riotx_keys_backup_banner_accent_color"
        android:minHeight="67dp"
        android:visibility="gone"
        tools:visibility="visible"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/syncStateView" />

    <im.vector.app.core.ui.views.ActiveCallView
        android:id="@+id/activeCallView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@id/homeKeysBackupBanner"
        tools:visibility="visible" />

    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/roomListContainer"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:background="?riotx_header_panel_background"
        app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView"
        app:layout_constraintTop_toBottomOf="@+id/activeCallView" />

    <androidx.cardview.widget.CardView
        android:id="@+id/activeCallPiPWrap"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="8dp"
        android:clickable="true"
        android:focusable="true"
        app:cardCornerRadius="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/activeCallView">

        <org.webrtc.SurfaceViewRenderer
            android:id="@+id/activeCallPiP"
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:visibility="gone"
            tools:visibility="visible" />

    </androidx.cardview.widget.CardView>

    <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottomNavigationView"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="?riotx_background"
        app:itemIconSize="20dp"
        app:itemIconTint="@color/bottom_navigation_icon_tint_selector"
        app:labelVisibilityMode="unlabeled"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:menu="@menu/home_bottom_navigation" />

</androidx.constraintlayout.widget.ConstraintLayout>