<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/artistImage"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        android:transitionName="@string/transition_artist_image"
        tools:srcCompat="@tools:sample/backgrounds/scenic[16]" />

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:elevation="0dp"
        app:elevation="0dp">

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

            <code.name.monkey.retromusic.views.WidthFitSquareLayout
                android:id="@+id/imageContainer"
                android:layout_width="400dp"
                android:layout_height="wrap_content"
                app:layout_collapseMode="parallax" />

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_collapseMode="pin">

                <com.google.android.material.appbar.MaterialToolbar
                    android:id="@+id/toolbar"
                    style="@style/Toolbar"
                    app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp" />

                <ViewStub
                    android:id="@+id/cab_stub"
                    android:layout_width="match_parent"
                    android:layout_height="48dp" />
            </FrameLayout>
        </com.google.android.material.appbar.CollapsingToolbarLayout>
    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="fill_vertical"
        android:layout_marginStart="128dp"
        android:layout_marginEnd="128dp"
        android:fillViewport="true"
        android:overScrollMode="never"
        app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/contentContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:background="?attr/colorSurface"
            app:cardElevation="8dp"
            app:shapeAppearanceOverlay="@style/TopCornerCardView">

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

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

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/artistTitle"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:maxLines="2"
                        android:textAppearance="@style/TextViewHeadline4"
                        android:textStyle="bold"
                        tools:ignore="MissingPrefix"
                        tools:text="Title" />

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/text"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:ellipsize="end"
                        android:fontFamily="sans-serif"
                        android:fontFeatureSettings="onum"
                        android:paddingTop="4dp"
                        android:singleLine="true"
                        android:textAppearance="@style/TextViewHeadline6"
                        android:textColor="?android:attr/textColorSecondary"
                        tools:ignore="MissingPrefix"
                        tools:text="Title" />

                </LinearLayout>

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

            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
    </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
