2015-06-20 18:46:04 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
|
<data>
|
2015-08-10 13:56:52 +00:00
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.tasks.Task" />
|
2015-08-17 20:06:29 +00:00
|
|
|
<import type="android.view.View"/>
|
2015-06-20 18:46:04 +00:00
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="daily"
|
2015-08-10 13:56:52 +00:00
|
|
|
type="Task" />
|
2015-06-20 18:46:04 +00:00
|
|
|
</data>
|
|
|
|
|
|
2015-08-17 20:06:29 +00:00
|
|
|
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_width="match_parent"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:background="@color/white"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<CheckBox
|
|
|
|
|
android:id="@+id/checkBox"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_width="@dimen/button_width"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:checked="@{daily.completed}"
|
|
|
|
|
app:backgroundColor="@{daily.getLightTaskColor}"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_gravity="center_horizontal" />
|
|
|
|
|
<RelativeLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent">
|
2015-06-29 16:24:44 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:orientation="vertical"
|
2015-08-17 15:37:43 +00:00
|
|
|
android:layout_width="wrap_content"
|
2015-06-29 16:24:44 +00:00
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:padding="5dp"
|
|
|
|
|
android:id="@+id/linearLayout"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_alignParentLeft="true"
|
|
|
|
|
android:layout_alignParentStart="true"
|
|
|
|
|
android:layout_toLeftOf="@+id/checklistIndicatorWrapper"
|
|
|
|
|
android:layout_toStartOf="@+id/checklistIndicatorWrapper">
|
|
|
|
|
<TextView
|
2015-06-29 16:24:44 +00:00
|
|
|
android:id="@+id/checkedTextView"
|
|
|
|
|
style="@style/CardTitle"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{daily.text}" />
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/textView6"
|
|
|
|
|
style="@style/CardText"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:text="@{daily.notes}"
|
|
|
|
|
android:visibility="@{daily.notes != null ? View.VISIBLE : View.GONE}"/>
|
2015-06-29 16:24:44 +00:00
|
|
|
</LinearLayout>
|
2015-08-17 20:06:29 +00:00
|
|
|
<RelativeLayout android:orientation="vertical"
|
|
|
|
|
android:id="@+id/checklistIndicatorWrapper"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_width="@dimen/checklist_wrapper_width"
|
2015-08-17 15:37:43 +00:00
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:06:29 +00:00
|
|
|
app:backgroundColor="@{daily.getLightTaskColor}"
|
|
|
|
|
android:visibility="@{daily.checklist.size > 0 ? View.VISIBLE : View.GONE}"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_alignParentBottom="true"
|
|
|
|
|
android:layout_alignParentRight="true"
|
|
|
|
|
android:layout_alignParentEnd="true">
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{String.valueOf(daily.getCompletedChecklistCount)}"
|
|
|
|
|
android:textColor="@color/white"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_above="@+id/checklistDivider"/>
|
|
|
|
|
<View
|
|
|
|
|
android:id="@+id/checklistDivider"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_width="@dimen/checklist_divider_width"
|
|
|
|
|
android:layout_height="@dimen/hairline_height"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:background="@color/white"
|
|
|
|
|
android:layout_centerInParent="true"/>
|
|
|
|
|
<TextView
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{String.valueOf(daily.checklist.size)}"
|
|
|
|
|
android:textColor="@color/white"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_below="@+id/checklistDivider"/>
|
|
|
|
|
</RelativeLayout>
|
2015-08-17 15:37:43 +00:00
|
|
|
<View
|
|
|
|
|
android:id="@+id/rightBorderView"
|
|
|
|
|
android:layout_width="5dp"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:layout_height="match_parent"
|
2015-08-17 15:37:43 +00:00
|
|
|
app:backgroundColor="@{daily.getLightTaskColor}"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_alignParentRight="true"
|
|
|
|
|
android:layout_alignParentEnd="true" />
|
|
|
|
|
</RelativeLayout>
|
|
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
<View
|
|
|
|
|
android:id="@+id/bottomBorderView"
|
|
|
|
|
android:layout_width="match_parent"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_height="@dimen/hairline_height"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:background="@color/cell_separator"/>
|
|
|
|
|
</LinearLayout>
|
2015-06-20 18:46:04 +00:00
|
|
|
</layout>
|