<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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="wrap_content">

    <TextView
        android:id="@+id/title"
        style="@style/TextAppearance.Regular.SubHeading"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:padding="@dimen/material_component_text_fields_padding_above_and_below_label"
        app:layout_constraintBottom_toTopOf="@+id/source_card"
        app:layout_constraintHeight_default="wrap"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Title" />

    <android.support.v7.widget.CardView
        android:id="@+id/source_card"
        style="@style/Theme.Widget.CardView.Item"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:minHeight="144dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHeight_default="wrap"
        app:layout_constraintStart_toStartOf="parent">

        <ProgressBar
            android:id="@+id/progress"
            style="?android:attr/progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" />

        <android.support.constraint.ConstraintLayout
            android:id="@+id/nothing_found"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:visibility="gone">

            <ImageView
                android:id="@+id/nothing_found_icon"
                android:layout_width="112dp"
                android:layout_height="112dp"
                android:scaleType="fitCenter"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="ContentDescription"
                tools:src="@mipmap/ic_launcher" />

            <TextView
                android:id="@+id/nothing_found_text"
                style="@style/TextAppearance.Regular.Caption.Hint"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="0dp"
                android:ellipsize="end"
                android:gravity="center"
                android:maxLines="1"
                android:paddingBottom="8dp"
                android:text="@string/no_results"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/nothing_found_icon" />

        </android.support.constraint.ConstraintLayout>

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingEnd="4dp"
            android:paddingStart="4dp"
            android:clipToPadding="false"
            tools:listitem="@layout/catalogue_global_search_controller_card_item" />
    </android.support.v7.widget.CardView>
</android.support.constraint.ConstraintLayout>