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-03 16:14:20 +00:00
|
|
|
<import type="com.magicmicky.habitrpgwrapper.lib.models.tasks.Habit" />
|
|
|
|
|
<import type="android.view.View"/>
|
2015-06-20 18:46:04 +00:00
|
|
|
|
|
|
|
|
<variable
|
|
|
|
|
name="habit"
|
2015-08-03 16:14:20 +00:00
|
|
|
type="Habit" />
|
2015-06-20 18:46:04 +00:00
|
|
|
</data>
|
|
|
|
|
|
|
|
|
|
<FrameLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
|
|
<android.support.v7.widget.CardView
|
|
|
|
|
android:id="@+id/card_view"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="100dp"
|
|
|
|
|
android:layout_marginBottom="@dimen/cardMarginVertical"
|
|
|
|
|
android:layout_marginLeft="@dimen/cardMarginHorizontal"
|
|
|
|
|
android:layout_marginRight="@dimen/cardMarginHorizontal"
|
|
|
|
|
android:layout_marginTop="@dimen/cardMarginVertical"
|
|
|
|
|
app:cardCornerRadius="2dp"
|
|
|
|
|
app:cardElevation="2dp"
|
|
|
|
|
app:cardPreventCornerOverlap="false"
|
2015-08-03 16:14:20 +00:00
|
|
|
app:contentPadding="0dp"
|
|
|
|
|
app:cardColor="@{habit.getLightTaskColor}">
|
2015-06-20 18:46:04 +00:00
|
|
|
|
|
|
|
|
<RelativeLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:gravity="fill_horizontal|center_vertical|center_horizontal|fill|clip_vertical|fill_vertical|center|start|clip_horizontal|bottom|left|right|end|top"
|
|
|
|
|
android:minHeight="250dp">
|
|
|
|
|
|
2015-08-03 16:14:20 +00:00
|
|
|
<LinearLayout
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_width="wrap_content"
|
2015-08-03 16:14:20 +00:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:orientation="vertical"
|
|
|
|
|
android:id="@+id/btnLayout">
|
|
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnPlus"
|
|
|
|
|
style="?android:attr/buttonStyleSmall"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:visibility="@{habit.up ? View.VISIBLE : View.GONE}"
|
|
|
|
|
android:text="+"
|
|
|
|
|
android:textSize="15sp"
|
|
|
|
|
app:backgroundColor="@{habit.getDarkTaskColor}" />
|
2015-06-20 18:46:04 +00:00
|
|
|
|
2015-08-03 16:14:20 +00:00
|
|
|
<Button
|
|
|
|
|
android:id="@+id/btnMinus"
|
|
|
|
|
style="?android:attr/buttonStyleSmall"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="0dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:visibility="@{habit.down ? View.VISIBLE : View.GONE}"
|
|
|
|
|
app:backgroundColor="@{habit.getDarkTaskColor}"
|
|
|
|
|
android:text="-"
|
|
|
|
|
android:textSize="15sp"/>
|
|
|
|
|
</LinearLayout>
|
2015-06-20 18:46:04 +00:00
|
|
|
|
|
|
|
|
<CheckedTextView
|
|
|
|
|
android:id="@+id/checkedTextView"
|
|
|
|
|
style="@style/CardTitle"
|
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"
|
|
|
|
|
android:layout_alignParentBottom="false"
|
2015-06-29 16:24:44 +00:00
|
|
|
android:layout_alignParentEnd="true"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_alignParentRight="true"
|
2015-08-03 16:14:20 +00:00
|
|
|
android:layout_toRightOf="@id/btnLayout"
|
|
|
|
|
android:layout_toEndOf="@id/btnLayout"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_alignParentTop="true"
|
|
|
|
|
android:paddingBottom="5dp"
|
2015-08-03 16:14:20 +00:00
|
|
|
android:paddingLeft="5dp"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:paddingRight="5dp"
|
2015-06-29 16:24:44 +00:00
|
|
|
android:paddingEnd="5dp"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:paddingTop="5dp"
|
|
|
|
|
android:text="@{habit.text}" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/textView6"
|
|
|
|
|
style="@style/CardText"
|
2015-06-29 16:24:44 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
2015-06-20 18:46:04 +00:00
|
|
|
android:layout_alignLeft="@+id/checkedTextView"
|
|
|
|
|
android:layout_alignStart="@+id/checkedTextView"
|
|
|
|
|
android:layout_below="@+id/checkedTextView"
|
|
|
|
|
android:text="@{habit.notes}" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</RelativeLayout>
|
|
|
|
|
</android.support.v7.widget.CardView>
|
|
|
|
|
</FrameLayout>
|
|
|
|
|
</layout>
|