habitica-android/Habitica/res/layout/habit_item_card.xml

92 lines
3.9 KiB
XML
Raw Normal View History

<?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-03 16:14:20 +00:00
<import type="android.view.View"/>
<variable
name="habit"
2015-08-10 13:56:52 +00:00
type="Task" />
</data>
2015-08-17 20:32:21 +00:00
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
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">
<LinearLayout
android:layout_width="match_parent"
2015-08-17 20:32:21 +00:00
android:layout_height="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/btnLayout">
<Button
android:id="@+id/btnPlus"
android:layout_width="@dimen/button_width"
android:layout_height="0dp"
android:layout_weight="1"
android:visibility="@{habit.up ? View.VISIBLE : View.GONE}"
android:text="+"
android:textSize="15sp"
app:backgroundColor="@{habit.getLightTaskColor}" />
<Button
android:id="@+id/btnMinus"
android:layout_width="@dimen/button_width"
android:layout_height="0dp"
android:layout_weight="1"
android:visibility="@{habit.down ? View.VISIBLE : View.GONE}"
app:backgroundColor="@{habit.getLightTaskColor}"
android:text="-"
android:textSize="15sp"/>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
2015-08-17 20:32:21 +00:00
android:layout_height="match_parent">
<TextView
android:id="@+id/checkedTextView"
style="@style/CardTitle"
2015-06-29 16:24:44 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="false"
2015-06-29 16:24:44 +00:00
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:paddingBottom="5dp"
2015-08-03 16:14:20 +00:00
android:paddingLeft="5dp"
android:paddingRight="5dp"
2015-06-29 16:24:44 +00:00
android:paddingEnd="5dp"
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"
android:layout_alignLeft="@+id/checkedTextView"
android:layout_alignStart="@+id/checkedTextView"
android:layout_below="@+id/checkedTextView"
android:text="@{habit.notes}" />
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" />
</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>
</layout>