<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:background="@color/white"
    android:foreground="?selectableItemBackground"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/main_task_wrapper"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/task_spacing_horizontal"
        android:layout_marginVertical="@dimen/task_spacing_vertical"
        android:background="@drawable/task_background"
        android:clipChildren="true"
        android:minHeight="@dimen/task_min_height">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:baselineAligned="false"
                android:minHeight="@dimen/task_min_height">

                <FrameLayout
                    android:id="@+id/checkBoxHolder"
                    android:layout_width="@dimen/button_width"
                    android:layout_height="match_parent">

                    <CheckBox
                        android:id="@+id/checkBox"
                        android:layout_width="@dimen/checkbox_size"
                        android:layout_height="@dimen/checkbox_size"
                        android:layout_gravity="center"
                        android:button="@drawable/daily_checkbox"
                        android:gravity="center" />
                </FrameLayout>
                <include layout="@layout/task_main_content" />
                <ProgressBar
                    android:id="@+id/syncing_view"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="@dimen/spacing_small"
                    android:layout_marginRight="@dimen/spacing_small"
                    style="@style/Widget.AppCompat.ProgressBar"/>
                <ImageButton
                    android:id="@+id/error_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:background="@color/transparent"
                    android:src="@drawable/ic_warning_black"
                    android:layout_marginLeft="@dimen/spacing_small"
                    android:layout_marginRight="@dimen/spacing_small"/>
                <include layout="@layout/checklist_indicator" />
            </LinearLayout>
            <LinearLayout
                android:id="@+id/checklistView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical" />
        </LinearLayout>
    </FrameLayout>
</LinearLayout>
