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

42 lines
1.7 KiB
XML
Raw Normal View History

2016-03-19 10:22:52 +00:00
<?xml version="1.0" encoding="utf-8"?>
2016-03-28 16:43:15 +00:00
<layout xmlns:android="http://schemas.android.com/apk/res/android"
2016-03-19 10:22:52 +00:00
xmlns:bind="http://schemas.android.com/apk/res-auto"
2016-03-28 16:43:15 +00:00
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable name="title" type="String"/>
<variable name="value" type="String"/>
<variable name="imageNamed" type="String"/>
</data>
<LinearLayout
2016-03-19 10:22:52 +00:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2016-03-28 16:43:15 +00:00
style="@style/RowWrapper"
2016-03-19 10:22:52 +00:00
android:clickable="true">
<ImageView
android:layout_width="@dimen/gear_image_size"
android:layout_height="@dimen/gear_image_size"
2016-03-28 16:43:15 +00:00
bind:imageName='@{imageNamed == null ? "head_0" : imageNamed}'
android:contentDescription="@{imageNamed}"
android:alpha="@{imageNamed == null ? 0.4f : 1.0f}"
2016-03-19 10:22:52 +00:00
android:scaleType="fitEnd"
android:layout_marginRight="@dimen/row_padding"/>
2016-03-28 16:43:15 +00:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center_vertical">
2016-03-19 10:22:52 +00:00
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
2016-03-28 16:43:15 +00:00
android:text="@{title}"
2016-03-19 10:22:52 +00:00
tools:text="Title"
style="@style/RowTitle"/>
2016-03-28 16:43:15 +00:00
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Value"
android:text="@{value}"
style="@style/RowText"/>
</LinearLayout>
</LinearLayout>
</layout>