<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="0dp"
        android:layout_marginEnd="0dp"
        android:background="@color/transparent"
        xmlns:tools="http://schemas.android.com/tools">

    <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/app_bar_layout"
            android:layout_width="match_parent"
            android:layout_height="300dp"
            android:background="@color/transparent">

        <com.google.android.material.appbar.CollapsingToolbarLayout
                android:id="@+id/collapsing_toolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/transparent"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView android:id="@+id/avatar"
                       android:layout_width="match_parent"
                       android:layout_height="match_parent"
                       android:transitionName="avatar"
                       app:layout_collapseMode="parallax"
                       app:layout_collapseParallaxMultiplier="0.7"/>

            <View
                    android:layout_width="match_parent"
                    android:layout_height="88dp"
                    android:background="@drawable/recipient_preference_scrim_top"
                    app:layout_collapseMode="pin"/>

            <View
                    android:layout_width="match_parent"
                    android:layout_height="98dp"
                    android:layout_gravity="bottom"
                    android:layout_alignBottom="@+id/image"
                    android:background="@drawable/recipient_preference_scrim_bottom"/>

            <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    android:theme="@style/TextSecure.LightActionBar"
                    android:background="@color/transparent"
                    android:layout_marginTop="24dp"
                    app:layout_collapseMode="pin" >

            </androidx.appcompat.widget.Toolbar>

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

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

    <androidx.core.widget.NestedScrollView
            android:id="@+id/scroll_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fillViewport="true"
            android:descendantFocusability="blocksDescendants"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

            <TextView android:id="@+id/rail_label"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:padding="16dp"
                      android:text="@string/recipient_preference_activity__shared_media"
                      android:visibility="gone"
                      android:focusableInTouchMode="true"
                      style="?android:attr/preferenceCategoryStyle"
                      android:textColor="@color/textsecure_primary"/>

            <org.thoughtcrime.securesms.components.ThreadPhotoRailView
                    android:id="@+id/recent_photos"
                    android:layout_width="match_parent"
                    android:layout_height="90dp"
                    android:visibility="visible"
                    android:layout_marginBottom="16dp"/>

            <include layout="@layout/preference_divider"/>

            <FrameLayout android:id="@+id/preference_fragment"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"/>

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>