<?xml version="1.0" encoding="utf-8"?><!--
  This file is part of BOINC.
  http://boinc.berkeley.edu
  Copyright (C) 2012 University of California
  
  BOINC is free software; you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License
  as published by the Free Software Foundation,
  either version 3 of the License, or (at your option) any later version.
  
  BOINC is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.
  
  You should have received a copy of the GNU Lesser General Public License
  along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:padding="2dp">

    <!-- left column -->
    <RelativeLayout
            android:id="@+id/icon_background"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:minHeight="60dp">

        <ImageView
                android:id="@+id/project_icon"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:scaleType="fitCenter"
                android:contentDescription="@string/projects_icon"
                android:layout_centerInParent="true"/>
    </RelativeLayout>

    <!-- center column -->
    <LinearLayout
            android:id="@+id/centerColumnWrapper"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginStart="3dp"
            android:layout_marginLeft="3dp"
            android:layout_toStartOf="@+id/rightColumnWrapper"
            android:layout_toLeftOf="@+id/rightColumnWrapper"
            android:layout_toEndOf="@+id/icon_background"
            android:layout_toRightOf="@+id/icon_background"
            android:orientation="vertical">

        <TextView
                android:id="@+id/task_header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:textColor="?android:attr/textColorPrimary"
                android:textStyle="bold"
                android:singleLine="true"/>

        <TextView
                android:id="@+id/project_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="?android:attr/textColorPrimary"
                android:singleLine="true"/>

        <LinearLayout
                android:id="@+id/statusTextWrapper"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

            <TextView
                    android:id="@+id/task_status"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:singleLine="true"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary"/>

            <TextView
                    android:id="@+id/task_status_percentage"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="10dip"
                    android:layout_marginLeft="10dip"
                    android:singleLine="true"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary"
                    android:textStyle="bold" />
        </LinearLayout>

        <ProgressBar
                android:id="@+id/progress_bar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="20dip"
                android:layout_marginLeft="10dip"
                android:layout_marginRight="10dip"
                android:layout_marginTop="5dip"
                android:layout_marginBottom="5dip"
                android:progressDrawable="@drawable/progressbar"/>

        <LinearLayout
                android:id="@+id/center_column_expand_wrapper"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="gone">

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                <TextView
                        android:id="@+id/taskTimeLabel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingEnd="5dp"
                        android:paddingRight="5dp"
                        android:text="@string/tasks_header_elapsed_time"
                        android:textColor="?android:attr/textColorPrimary"
                        android:textStyle="bold" />

                <TextView
                        android:id="@+id/task_time"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingEnd="10dp"
                        android:paddingRight="10dp"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textColor="?android:attr/textColorPrimary" />
            </LinearLayout>

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                <TextView
                        android:id="@+id/taskNameLabel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingEnd="5dp"
                        android:paddingRight="5dp"
                        android:text="@string/tasks_header_name"
                        android:textColor="?android:attr/textColorPrimary"
                        android:textStyle="bold" />

                <TextView
                        android:id="@+id/taskName"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textColor="?android:attr/textColorPrimary"/>
            </LinearLayout>

            <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                <TextView
                        android:id="@+id/deadlineLabel"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:paddingEnd="5dp"
                        android:paddingRight="5dp"
                        android:text="@string/tasks_header_deadline"
                        android:textColor="?android:attr/textColorPrimary"
                        android:textStyle="bold" />

                <TextView
                        android:id="@+id/deadline"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textColor="?android:attr/textColorPrimary"/>
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>

    <!-- right column -->
    <LinearLayout
            android:id="@+id/rightColumnWrapper"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:orientation="vertical">

        <ImageView
                android:id="@+id/expand_collapse"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@drawable/ic_baseline_keyboard_arrow_right"
                app:srcCompat="@drawable/ic_baseline_keyboard_arrow_right"/>

        <RelativeLayout
                android:id="@+id/right_column_expand_wrapper"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone">

            <ImageView
                    android:id="@+id/suspend_resume_task"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:clickable="true"
                    android:background="@color/dark_green"
                    android:contentDescription="@drawable/ic_baseline_play_arrow_white"
                    app:srcCompat="@drawable/ic_baseline_play_arrow_white"
                    android:layout_marginTop="5dp"/>

            <ImageView
                    android:id="@+id/abort_task"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:clickable="true"
                    android:background="@color/red"
                    android:contentDescription="@drawable/ic_baseline_delete_white"
                    app:srcCompat="@drawable/ic_baseline_delete_white"
                    android:layout_marginTop="5dp"
                    android:layout_below="@+id/suspend_resume_task"/>

            <ProgressBar
                    android:id="@+id/request_progress_bar"
                    style="?android:attr/progressBarStyleSmall"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:layout_margin="5dp"
                    android:visibility="gone"/>
        </RelativeLayout>

    </LinearLayout>

</RelativeLayout>