2015-06-20 18:46:04 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
2015-12-25 11:49:53 +00:00
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
xmlns:bind="http://schemas.android.com/tools">
|
2015-06-20 18:46:04 +00:00
|
|
|
<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-08-31 15:48:56 +00:00
|
|
|
<variable
|
|
|
|
|
name="displayChecklist"
|
|
|
|
|
type="Boolean" />
|
2015-11-14 18:02:20 +00:00
|
|
|
<variable
|
|
|
|
|
name="offset"
|
|
|
|
|
type="int" />
|
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"
|
2016-03-07 17:21:59 +00:00
|
|
|
android:layout_height="wrap_content"
|
2015-08-17 20:06:29 +00:00
|
|
|
android:background="@color/white"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
2016-03-07 17:21:59 +00:00
|
|
|
android:layout_height="wrap_content"
|
2015-11-07 18:10:03 +00:00
|
|
|
android:orientation="horizontal">
|
|
|
|
|
<RelativeLayout
|
2015-12-18 06:36:29 +00:00
|
|
|
android:id="@+id/checkBoxHolder"
|
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-11-14 18:02:20 +00:00
|
|
|
app:backgroundColor="@{daily.isDisplayedActive(offset) ? daily.getLightTaskColor : @color/task_gray}">
|
2015-11-07 18:10:03 +00:00
|
|
|
<CheckBox
|
|
|
|
|
android:id="@+id/checkBox"
|
|
|
|
|
android:layout_width="@dimen/checkbox_size"
|
|
|
|
|
android:layout_height="@dimen/checkbox_size"
|
|
|
|
|
android:layout_centerInParent="true"
|
|
|
|
|
android:checked="@{daily.completed}"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:button="@drawable/daily_checkbox"
|
|
|
|
|
android:layout_gravity="center_horizontal" />
|
|
|
|
|
</RelativeLayout>
|
2015-08-17 20:06:29 +00:00
|
|
|
<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-11-07 18:10:03 +00:00
|
|
|
android:paddingLeft="16dp"
|
|
|
|
|
android:paddingRight="16dp"
|
|
|
|
|
android:paddingEnd="16dp"
|
2015-12-01 18:41:07 +00:00
|
|
|
android:paddingBottom="@dimen/task_top_bottom_padding"
|
|
|
|
|
android:paddingTop="@dimen/task_top_bottom_padding"
|
2015-08-17 20:06:29 +00:00
|
|
|
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">
|
2015-12-26 15:21:21 +00:00
|
|
|
<com.github.data5tream.emojilib.EmojiTextView
|
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"
|
2015-12-25 11:49:53 +00:00
|
|
|
bind:parsemarkdown="@{daily.text}" />
|
2015-12-26 15:21:21 +00:00
|
|
|
<com.github.data5tream.emojilib.EmojiTextView
|
2015-11-24 20:21:32 +00:00
|
|
|
android:id="@+id/notesTextView"
|
2015-06-29 16:24:44 +00:00
|
|
|
style="@style/CardText"
|
|
|
|
|
android:layout_width="match_parent"
|
2015-11-07 18:10:03 +00:00
|
|
|
android:layout_height="wrap_content"
|
2015-12-25 11:49:53 +00:00
|
|
|
bind:parsemarkdown="@{daily.notes}"
|
2015-08-17 20:06:29 +00:00
|
|
|
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-11-29 16:34:04 +00:00
|
|
|
app:backgroundColor="@{daily.isChecklistDisplayActive(offset) ? daily.getLightTaskColor : @color/task_gray}"
|
2015-08-17 20:06:29 +00:00
|
|
|
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-11-14 18:02:20 +00:00
|
|
|
app:backgroundColor="@{daily.isDisplayedActive(offset) ? daily.getLightTaskColor : @color/task_gray}"
|
2015-08-31 17:02:12 +00:00
|
|
|
android:visibility="@{daily.checklist.size == 0 ? View.VISIBLE : View.GONE}"
|
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"/>
|
2015-08-31 15:48:56 +00:00
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:id="@+id/checklistView"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:visibility="@{displayChecklist != null && displayChecklist ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="10dp"
|
|
|
|
|
android:background="@color/checklist_separator"
|
|
|
|
|
android:visibility="@{displayChecklist != null && displayChecklist ? View.VISIBLE : View.GONE}" />
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="@dimen/hairline_height"
|
|
|
|
|
android:background="@color/cell_separator"
|
|
|
|
|
android:visibility="@{displayChecklist != null && displayChecklist ? View.VISIBLE : View.GONE}" />
|
2015-08-17 20:06:29 +00:00
|
|
|
</LinearLayout>
|
2015-06-20 18:46:04 +00:00
|
|
|
</layout>
|