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-03 16:14:20 +00:00
|
|
|
<import type="android.view.View"/>
|
2015-06-20 18:46:04 +00:00
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="habit"
|
2015-08-10 13:56:52 +00:00
|
|
|
type="Task" />
|
2015-06-20 18:46:04 +00:00
|
|
|
</data>
|
|
|
|
|
|
2015-08-17 20:32:21 +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:32:21 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:background="@color/white">
|
2015-12-01 18:41:07 +00:00
|
|
|
android:minHeight="@dimen/task_min_height">
|
2015-08-17 20:32:21 +00:00
|
|
|
<LinearLayout
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_width="match_parent"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
<LinearLayout
|
2015-11-07 14:27:17 +00:00
|
|
|
android:layout_width="80dp"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_height="match_parent"
|
2015-11-07 14:27:17 +00:00
|
|
|
android:orientation="horizontal"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:id="@+id/btnLayout">
|
2015-12-16 13:39:32 +00:00
|
|
|
<FrameLayout
|
2015-11-07 14:27:17 +00:00
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:visibility="@{habit.up ? View.VISIBLE : View.GONE}"
|
2015-12-16 13:39:32 +00:00
|
|
|
android:layout_weight="1">
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
app:backgroundColor="@{habit.getLightTaskColor}"/>
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnPlus"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="+"
|
|
|
|
|
android:background="@drawable/btn_habit_background"
|
|
|
|
|
style="@style/HabitButton" />
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
<FrameLayout
|
2015-11-07 14:27:17 +00:00
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:visibility="@{habit.down ? View.VISIBLE : View.GONE}"
|
2015-12-16 13:39:32 +00:00
|
|
|
android:layout_weight="1">
|
|
|
|
|
<View
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
app:backgroundColor="@{habit.up ? habit.getMediumTaskColor : habit.getLightTaskColor}"/>
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnMinus"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:text="-"
|
|
|
|
|
android:background="@drawable/btn_habit_background"
|
|
|
|
|
style="@style/HabitButton"/>
|
|
|
|
|
</FrameLayout>
|
2015-08-17 20:32:21 +00:00
|
|
|
</LinearLayout>
|
2015-06-20 18:46:04 +00:00
|
|
|
<RelativeLayout
|
|
|
|
|
android:layout_width="match_parent"
|
2015-08-17 20:32:21 +00:00
|
|
|
android:layout_height="match_parent">
|
2015-08-26 19:09:51 +00:00
|
|
|
<LinearLayout
|
2015-06-29 16:24:44 +00:00
|
|
|
android:layout_width="match_parent"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_height="wrap_content"
|
2015-08-26 19:09:51 +00:00
|
|
|
android:orientation="vertical"
|
2015-11-07 14:27:17 +00:00
|
|
|
android:layout_centerVertical="true"
|
|
|
|
|
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-12-26 15:21:21 +00:00
|
|
|
<com.github.data5tream.emojilib.EmojiTextView
|
2015-08-26 19:09:51 +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="@{habit.text}" />
|
2015-06-20 18:46:04 +00:00
|
|
|
|
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-08-26 19:09:51 +00:00
|
|
|
style="@style/CardText"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2015-12-25 11:49:53 +00:00
|
|
|
bind:parsemarkdown="@{habit.notes}"
|
2015-08-26 19:09:51 +00:00
|
|
|
android:visibility="@{habit.notes != null ? View.VISIBLE : View.GONE}"/>
|
|
|
|
|
</LinearLayout>
|
2015-08-17 20:32:21 +00:00
|
|
|
<View
|
|
|
|
|
android:id="@+id/rightBorderView"
|
|
|
|
|
android:layout_width="5dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
app:backgroundColor="@{habit.getLightTaskColor}"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:layout_alignParentRight="true"
|
|
|
|
|
android:layout_alignParentEnd="true" />
|
2015-06-20 18:46:04 +00:00
|
|
|
</RelativeLayout>
|
2015-08-17 20:32:21 +00:00
|
|
|
</LinearLayout>
|
|
|
|
|
<View
|
|
|
|
|
android:id="@+id/bottomBorderView"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="0.5dp"
|
|
|
|
|
android:background="@color/cell_separator"/>
|
|
|
|
|
</LinearLayout>
|
2015-06-20 18:46:04 +00:00
|
|
|
</layout>
|