layout_personal_header_item.xml
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="com.cnlive.gundam.user.model.PersonalData" />
<import type="com.cnlive.gundam.main.ui.adapter.DataBindingAdapter.OnAdapterViewClickListener"/>
<variable
name="data"
type="PersonalData" />
<variable
name="viewClickListner"
type="OnAdapterViewClickListener<PersonalData>"/>
</data>
<RelativeLayout
android:id="@+id/itemLayout"
android:layout_width="match_parent"
android:layout_height="80dp"
android:onClick="@{(view)->viewClickListner.onViewClick(view,data)}">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/divider"
android:background="@android:color/white">
<TextView
android:id="@+id/itemName"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="@{data.getItemName()}"
android:textColor="@color/black"
android:textSize="18sp"
android:layout_marginLeft="10dp"
tools:text="nick" />
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginRight="50dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:scaleType="centerCrop"
app:error="@{@drawable/image_error}"
app:imageUrl="@{data.getItemMessage()}"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</layout>