fragment_chat.xml
3.3 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?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>
<variable
name="messageAdapter"
type="com.cnlive.gundam.video.adpter.CommonAdapter" />
<variable
name="giftAdapter"
type="com.cnlive.gundam.video.adpter.GiftAdapter" />
</data>
<RelativeLayout
android:id="@+id/lin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent">
<ListView
android:id="@+id/list_message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/edit_layout"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:divider="@null"
android:scrollbars="none"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
app:Adapter="@{messageAdapter}" />
<RelativeLayout
android:id="@+id/edit_layout"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#555756"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<ImageView
android:id="@+id/sendMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:src="@drawable/btn_send_message" />
<ImageView
android:id="@+id/img_gift"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/gift" />
<android.support.v7.widget.SwitchCompat
android:id="@+id/barrage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@null"
android:textIsSelectable="false"
android:thumb="@drawable/switch_thumb"
app:switchMinWidth="30dp"
app:track="@drawable/switch_track" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl_gift"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/edit_layout"
android:background="#979797"
android:visibility="invisible">
<android.support.v7.widget.RecyclerView
android:padding="5dp"
android:id="@+id/recycler_gift"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:adapter="@{giftAdapter}" />
</RelativeLayout>
</RelativeLayout>
</layout>