Commit f44353d0ab1dc631b3d4954899685ecdd2074a57
1 parent
48faa6ab
更新SDK 并 显示聊天历史
Showing
3 changed files
with
19 additions
and
22 deletions
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,7 +333,7 @@ public class ChatRoomActivity extends AppCompatActivity implements View.OnClickL | ||
| 333 | } | 333 | } |
| 334 | break; | 334 | break; |
| 335 | case R.id.creatChat: | 335 | case R.id.creatChat: |
| 336 | - ChatUtil.joinChatRoom(roomIdOne, -1, onOperationListener); | 336 | + ChatUtil.joinChatRoom(roomIdOne, 20, onOperationListener); |
| 337 | break; | 337 | break; |
| 338 | case R.id.exit_chat1: | 338 | case R.id.exit_chat1: |
| 339 | ChatUtil.quitChatRoom(roomIdOne, onOperationListener); | 339 | ChatUtil.quitChatRoom(roomIdOne, onOperationListener); |
app/src/main/res/layout/activity_groupchat.xml
| @@ -11,32 +11,28 @@ | @@ -11,32 +11,28 @@ | ||
| 11 | android:layout_alignParentLeft="true" | 11 | android:layout_alignParentLeft="true" |
| 12 | android:layout_alignParentStart="true" | 12 | android:layout_alignParentStart="true" |
| 13 | android:layout_alignParentTop="true" | 13 | android:layout_alignParentTop="true" |
| 14 | - android:visibility="visible" | ||
| 15 | - android:clickable="true"> | 14 | + android:clickable="true" |
| 15 | + android:visibility="visible"> | ||
| 16 | 16 | ||
| 17 | <LinearLayout | 17 | <LinearLayout |
| 18 | android:id="@+id/listVIewTop" | 18 | android:id="@+id/listVIewTop" |
| 19 | android:layout_width="match_parent" | 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 | android:layout_alignParentLeft="true" | 22 | android:layout_alignParentLeft="true" |
| 22 | android:layout_alignParentStart="true" | 23 | android:layout_alignParentStart="true" |
| 23 | android:layout_alignParentTop="true" | 24 | android:layout_alignParentTop="true" |
| 24 | android:orientation="horizontal"> | 25 | android:orientation="horizontal"> |
| 25 | 26 | ||
| 26 | - <LinearLayout | 27 | + |
| 28 | + <android.support.v7.widget.RecyclerView | ||
| 29 | + android:id="@+id/chat_list_viewOne" | ||
| 27 | android:layout_width="match_parent" | 30 | android:layout_width="match_parent" |
| 28 | android:layout_height="match_parent" | 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 | </LinearLayout> | 36 | </LinearLayout> |
| 41 | 37 | ||
| 42 | <LinearLayout | 38 | <LinearLayout |
| @@ -78,7 +74,7 @@ | @@ -78,7 +74,7 @@ | ||
| 78 | android:layout_gravity="center_vertical" | 74 | android:layout_gravity="center_vertical" |
| 79 | android:layout_weight="0.1" | 75 | android:layout_weight="0.1" |
| 80 | android:src="@drawable/pic" | 76 | android:src="@drawable/pic" |
| 81 | - android:visibility="visible"/> | 77 | + android:visibility="visible" /> |
| 82 | 78 | ||
| 83 | <Button | 79 | <Button |
| 84 | android:id="@+id/send_messageOne" | 80 | android:id="@+id/send_messageOne" |
| @@ -87,11 +83,12 @@ | @@ -87,11 +83,12 @@ | ||
| 87 | android:layout_gravity="center" | 83 | android:layout_gravity="center" |
| 88 | android:layout_weight="0.2" | 84 | android:layout_weight="0.2" |
| 89 | android:text="发送" | 85 | android:text="发送" |
| 90 | - android:visibility="gone"/> | 86 | + android:visibility="gone" /> |
| 91 | 87 | ||
| 92 | </LinearLayout> | 88 | </LinearLayout> |
| 93 | 89 | ||
| 94 | <LinearLayout | 90 | <LinearLayout |
| 91 | + android:id="@+id/buttons" | ||
| 95 | android:layout_width="match_parent" | 92 | android:layout_width="match_parent" |
| 96 | android:layout_height="wrap_content" | 93 | android:layout_height="wrap_content" |
| 97 | android:layout_above="@id/edit_layout" | 94 | android:layout_above="@id/edit_layout" |
| @@ -109,10 +106,10 @@ | @@ -109,10 +106,10 @@ | ||
| 109 | android:text="加入聊天室" /> | 106 | android:text="加入聊天室" /> |
| 110 | 107 | ||
| 111 | <!--<Button--> | 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 | <Button | 114 | <Button |
| 118 | android:id="@+id/exit_chat1" | 115 | android:id="@+id/exit_chat1" |