<?xml version="1.0" encoding="utf-8"?>
<android.support.design.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/messages_coordinator_layout"
  android:fitsSystemWindows="true"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

  <android.support.design.widget.AppBarLayout
    android:id="@+id/messages_app_bar_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:elevation="0dp">

    <android.support.design.widget.CollapsingToolbarLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:background="@color/white"
      android:elevation="@dimen/toolbar_elevation"
      app:contentScrim="@color/white"
      app:layout_scrollFlags="scroll|exitUntilCollapsed"
      tools:ignore="UnusedAttribute">

      <LinearLayout
        android:orientation="vertical"
        android:layout_marginTop="@dimen/grid_10"
        android:layout_marginStart="@dimen/grid_8"
        android:layout_marginEnd="@dimen/grid_8"
        android:gravity="center"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_collapseMode="parallax">

        <TextView
          android:id="@+id/messages_project_name_text_view"
          style="@style/Headline"
          android:fontFamily="@string/font_family_maison_neue_book"
          android:ellipsize="end"
          android:gravity="center"
          android:layout_marginBottom="@dimen/grid_2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          tools:text="This Cool Project I Backed"/>

        <TextView
          android:id="@+id/messages_creator_name_text_view"
          android:layout_marginBottom="@dimen/grid_5"
          style="@style/FootnotePrimary"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          tools:text="by Some Creator"/>

      </LinearLayout>

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

    </android.support.design.widget.CollapsingToolbarLayout>

    <View
      android:background="@color/white"
      android:layout_width="match_parent"
      android:layout_height="@dimen/grid_1"/>

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

  </android.support.design.widget.AppBarLayout>

  <android.support.v7.widget.RecyclerView
    android:id="@+id/messages_recycler_view"
    android:background="@color/white"
    android:scrollbars="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:ignore="RtlSymmetry" />

  <ProgressBar
    android:id="@+id/messages_loading_indicator"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:layout_anchor="@id/messages_recycler_view"
    app:layout_anchorGravity="center"/>

  <include
    android:id="@+id/message_reply_layout"
    layout="@layout/message_reply_layout" />

</android.support.design.widget.CoordinatorLayout>
