boinc/android/BOINC/res/layout/tasks_layout_listitem.xml

236 lines
9.0 KiB
XML

<?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"
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"
android:background="@android:color/transparent">
<ImageView
android:id="@+id/projectIcon"
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_marginLeft="3dp"
android:orientation="vertical"
android:layout_toRightOf="@+id/icon_background"
android:layout_toLeftOf="@+id/rightColumnWrapper"
android:layout_alignParentTop="true" >
<TextView
android:id="@+id/taskHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/black"
android:textStyle="bold"
android:singleLine="true" />
<TextView
android:id="@+id/projectName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/dark_grey"
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/taskStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/dark_grey" />
<TextView
android:id="@+id/taskStatusPercentage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/dark_grey"
android:textStyle="bold" />
</LinearLayout>
<ProgressBar
android:id="@+id/progressBar"
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/centerColumnExpandWrapper"
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:paddingRight="5dp"
android:text="@string/tasks_header_elapsed_time"
android:textColor="@color/dark_grey"
android:textStyle="bold" />
<TextView
android:id="@+id/taskTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="10dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/dark_grey"/>
</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:paddingRight="5dp"
android:text="@string/tasks_header_name"
android:textColor="@color/dark_grey"
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="@color/dark_grey" />
</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:paddingRight="5dp"
android:text="@string/tasks_header_deadline"
android:textColor="@color/dark_grey"
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="@color/dark_grey" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- right column -->
<LinearLayout
android:id="@+id/rightColumnWrapper"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true">
<ImageView
android:id="@+id/expandCollapse"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@drawable/collapse"
android:src="@drawable/collapse" />
<RelativeLayout
android:id="@+id/rightColumnExpandWrapper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone">
<ImageView
android:id="@+id/suspendResumeTask"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@drawable/resumetask"
android:src="@drawable/resumetask"
android:layout_marginTop="5dp" />
<ImageView
android:id="@+id/abortTask"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@drawable/aborttask"
android:src="@drawable/aborttask"
android:layout_marginTop="5dp"
android:layout_below="@+id/suspendResumeTask" />
<ProgressBar
android:id="@+id/request_progressBar"
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>