Commit f44353d0ab1dc631b3d4954899685ecdd2074a57

Authored by 朱显松
1 parent 48faa6ab

更新SDK 并 显示聊天历史

app/libs/libcnliveutil.jar
No preview for this file type
app/src/main/java/com/cnlive/im/ui/ChatRoomActivity.java
... ... @@ -333,7 +333,7 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL
333 333 }
334 334 break;
335 335 case R.id.creatChat:
336   - ChatUtil.joinChatRoom(roomIdOne, -1, onOperationListener);
  336 + ChatUtil.joinChatRoom(roomIdOne, 20, onOperationListener);
337 337 break;
338 338 case R.id.exit_chat1:
339 339 ChatUtil.quitChatRoom(roomIdOne, onOperationListener);
... ...
app/src/main/res/layout/activity_groupchat.xml
... ... @@ -11,32 +11,28 @@
11 11 android:layout_alignParentLeft="true"
12 12 android:layout_alignParentStart="true"
13 13 android:layout_alignParentTop="true"
14   - android:visibility="visible"
15   - android:clickable="true">
  14 + android:clickable="true"
  15 + android:visibility="visible">
16 16  
17 17 <LinearLayout
18 18 android:id="@+id/listVIewTop"
19 19 android:layout_width="match_parent"
20   - android:layout_height="wrap_content"
  20 + android:layout_height="match_parent"
  21 + android:layout_above="@+id/buttons"
21 22 android:layout_alignParentLeft="true"
22 23 android:layout_alignParentStart="true"
23 24 android:layout_alignParentTop="true"
24 25 android:orientation="horizontal">
25 26  
26   - <LinearLayout
  27 +
  28 + <android.support.v7.widget.RecyclerView
  29 + android:id="@+id/chat_list_viewOne"
27 30 android:layout_width="match_parent"
28 31 android:layout_height="match_parent"
29   - android:orientation="vertical">
30   -
31   - <android.support.v7.widget.RecyclerView
32   - android:id="@+id/chat_list_viewOne"
33   - android:layout_width="fill_parent"
34   - android:layout_height="200dp"
35   - android:layout_above="@+id/edit_layout"
36   - android:divider="@null"
37   - android:fastScrollEnabled="true"
38   - android:scrollbars="none" />
39   - </LinearLayout>
  32 + android:layout_above="@+id/edit_layout"
  33 + android:divider="@null"
  34 + android:fastScrollEnabled="true"
  35 + android:scrollbars="none" />
40 36 </LinearLayout>
41 37  
42 38 <LinearLayout
... ... @@ -78,7 +74,7 @@
78 74 android:layout_gravity="center_vertical"
79 75 android:layout_weight="0.1"
80 76 android:src="@drawable/pic"
81   - android:visibility="visible"/>
  77 + android:visibility="visible" />
82 78  
83 79 <Button
84 80 android:id="@+id/send_messageOne"
... ... @@ -87,11 +83,12 @@
87 83 android:layout_gravity="center"
88 84 android:layout_weight="0.2"
89 85 android:text="发送"
90   - android:visibility="gone"/>
  86 + android:visibility="gone" />
91 87  
92 88 </LinearLayout>
93 89  
94 90 <LinearLayout
  91 + android:id="@+id/buttons"
95 92 android:layout_width="match_parent"
96 93 android:layout_height="wrap_content"
97 94 android:layout_above="@id/edit_layout"
... ... @@ -109,10 +106,10 @@
109 106 android:text="加入聊天室" />
110 107  
111 108 <!--<Button-->
112   - <!--android:id="@+id/ima_send"-->
113   - <!--android:layout_width="wrap_content"-->
114   - <!--android:layout_height="wrap_content"-->
115   - <!--android:text="图片" />-->
  109 + <!--android:id="@+id/ima_send"-->
  110 + <!--android:layout_width="wrap_content"-->
  111 + <!--android:layout_height="wrap_content"-->
  112 + <!--android:text="图片" />-->
116 113  
117 114 <Button
118 115 android:id="@+id/exit_chat1"
... ...