<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
	android:id="@+id/drawer_layout"
	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"
	tools:context=".android.navdrawer.NavDrawerActivity">

	<!-- The first child(root) is the content view -->
	<android.support.constraint.ConstraintLayout
		android:id="@+id/constraintLayout"
		android:layout_width="match_parent"
		android:layout_height="match_parent">

		<include
			android:id="@+id/appBar"
			layout="@layout/toolbar"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent"/>

		<android.support.constraint.ConstraintLayout
			android:id="@+id/expiryWarning"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:background="@color/briar_warning_background"
			android:orientation="horizontal"
			android:padding="@dimen/margin_medium"
			android:visibility="gone"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/appBar"
			tools:visibility="visible">

			<TextView
				android:id="@+id/expiryWarningText"
				android:layout_width="0dp"
				android:layout_height="wrap_content"
				android:text="@plurals/expiry_warning"
				android:textColor="@color/briar_text_primary_inverse"
				android:textSize="@dimen/text_size_small"
				app:layout_constraintEnd_toStartOf="@+id/expiryWarningClose"
				app:layout_constraintStart_toStartOf="parent"
				app:layout_constraintTop_toTopOf="parent"/>

			<ImageView
				android:id="@+id/expiryWarningClose"
				android:layout_width="24dp"
				android:layout_height="0dp"
				android:contentDescription="@string/close"
				android:scaleType="center"
				android:src="@drawable/ic_close"
				android:tint="@color/briar_text_tertiary_inverse"
				app:layout_constraintBottom_toBottomOf="parent"
				app:layout_constraintEnd_toEndOf="parent"
				app:layout_constraintTop_toTopOf="parent"/>

		</android.support.constraint.ConstraintLayout>

		<FrameLayout
			android:id="@+id/fragmentContainer"
			android:layout_width="0dp"
			android:layout_height="0dp"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/expiryWarning"/>

	</android.support.constraint.ConstraintLayout>

	<!-- The second child is the menu -->
	<include
		layout="@layout/navigation_menu"
		android:layout_width="wrap_content"
		android:layout_height="match_parent"
		android:layout_gravity="start"/>

</android.support.v4.widget.DrawerLayout>
