habitica-android/Habitica/res/layout/todo_item_card.xml
2015-08-10 15:56:52 +02:00

71 lines
No EOL
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.magicmicky.habitrpgwrapper.lib.models.tasks.Task" />
<variable
name="todo"
type="Task" />
</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="80dp"
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"
app:contentPadding="0dp"
app:cardColor="@{todo.getLightTaskColor}">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/textView6"
android:layout_alignLeft="@+id/checkedTextView"
android:layout_alignStart="@+id/checkedTextView">
<CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:checked="@{todo.completed}"
app:backgroundColor="@{todo.getDarkTaskColor}"
android:gravity="center"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp">
<CheckedTextView
android:id="@+id/checkedTextView"
style="@style/CardTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{todo.text}" />
<TextView
android:id="@+id/textView6"
style="@style/CardText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{todo.notes}" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</FrameLayout>
</layout>