layout_item_short_video.xml
3.02 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="com.cnlive.gundam.shortvideo.model.ShortVideoInfo" />
<import type="android.view.View" />
<import type="com.cnlive.gundam.main.ui.adapter.DataBindingAdapter.OnAdapterViewClickListener" />
<variable
name="shortVideoInfo"
type="ShortVideoInfo" />
<variable
name="viewClickListner"
type="OnAdapterViewClickListener<ShortVideoInfo>" />
</data>
<LinearLayout
android:id="@+id/item_short_video"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:onClick="@{(view)->viewClickListner.onViewClick(view, shortVideoInfo)}"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/cover_image"
android:layout_width="90dp"
android:layout_height="90dp"
android:padding="2dp"
app:error="@{@drawable/default_pic}"
app:imageUrl="@{shortVideoInfo.picKey}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="90dp"
android:layout_marginLeft="10dp"
android:gravity="center_vertical"
android:orientation="vertical">
<TextView
android:id="@+id/video_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{shortVideoInfo.name}"
android:textColor="@color/black"
android:textSize="18sp" />
<!--<TextView-->
<!--android:id="@+id/video_time"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_marginLeft="10dp"-->
<!--android:layout_marginTop="10dp"-->
<!--android:text="@{shortVideoInfo.createTime}"-->
<!--android:textSize="14sp" />-->
<TextView
android:id="@+id/video_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="3dp"
android:text="@{shortVideoInfo.description}"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_line_color" />
</LinearLayout>
</layout>