2016-01-12 16:08:02 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
|
|
xmlns:bind="http://schemas.android.com/apk/res-auto"
|
|
|
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
|
<data>
|
|
|
|
|
<variable name="title" type="String"/>
|
|
|
|
|
<variable name="value" type="String"/>
|
|
|
|
|
<variable name="valueInt" type="int"/>
|
|
|
|
|
<variable name="imageNamed" type="String"/>
|
|
|
|
|
</data>
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
2016-01-13 16:25:08 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:minHeight="60dp"
|
|
|
|
|
android:padding="5dp"
|
2016-03-10 13:05:32 +00:00
|
|
|
android:paddingTop="@dimen/row_padding"
|
|
|
|
|
android:paddingBottom="@dimen/row_padding"
|
2016-01-13 16:25:08 +00:00
|
|
|
android:clickable="true"
|
2016-03-08 19:53:03 +00:00
|
|
|
android:background="@drawable/selection_highlight">
|
2016-01-12 16:08:02 +00:00
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="60dp"
|
|
|
|
|
android:layout_height="60dp"
|
|
|
|
|
bind:imageName='@{imageNamed == null ? "head_0" : imageNamed}'
|
|
|
|
|
android:contentDescription="@{imageNamed}"
|
|
|
|
|
android:alpha="@{imageNamed == null ? 0.4f : 1.0f}"
|
|
|
|
|
android:scaleType="fitEnd"/>
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
<TextView android:layout_margin="5dp"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:text="@{title}"
|
|
|
|
|
tools:text="Title"
|
|
|
|
|
android:textStyle="bold"/>
|
|
|
|
|
<TextView android:layout_margin="5dp"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2016-01-13 16:25:08 +00:00
|
|
|
android:textColor="@android:color/darker_gray"
|
2016-01-12 16:08:02 +00:00
|
|
|
tools:text="Value"
|
|
|
|
|
android:text="@{value != null ? value : (valueInt != 0 ? String.valueOf(valueInt) : @string/avatar_nothing)}" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
</layout>
|