Commit 21d238a13d16eb9f15ac7243f3548937af608bc0
1 parent
63b6f864
修改配置
Showing
2 changed files
with
3 additions
and
39 deletions
app/src/main/AndroidManifest.xml
| @@ -41,6 +41,9 @@ | @@ -41,6 +41,9 @@ | ||
| 41 | 41 | ||
| 42 | <activity | 42 | <activity |
| 43 | android:name="com.cnlive.im.ui.PrivateChatActivity" | 43 | android:name="com.cnlive.im.ui.PrivateChatActivity" |
| 44 | + android:launchMode="singleTop" | ||
| 45 | + android:screenOrientation="portrait" | ||
| 46 | + android:windowSoftInputMode="adjustResize" | ||
| 44 | /> | 47 | /> |
| 45 | 48 | ||
| 46 | <meta-data | 49 | <meta-data |
app/src/main/java/com/cnlive/im/ui/PrivateChatActivity.java
| @@ -55,7 +55,6 @@ public class PrivateChatActivity extends AppCompatActivity implements View.OnCli | @@ -55,7 +55,6 @@ public class PrivateChatActivity extends AppCompatActivity implements View.OnCli | ||
| 55 | initView(); | 55 | initView(); |
| 56 | mHandler = new Handler(); | 56 | mHandler = new Handler(); |
| 57 | ChatUtil.setConnectStatusListener(connectStatusListener); | 57 | ChatUtil.setConnectStatusListener(connectStatusListener); |
| 58 | - ChatUtil.setOnChatRoomActionListener(chatRoomActionListener); | ||
| 59 | ChatUtil.setOnReceiveMessageListener(receiveMessageListener); | 58 | ChatUtil.setOnReceiveMessageListener(receiveMessageListener); |
| 60 | ChatUtil.connect(connectListener); | 59 | ChatUtil.connect(connectListener); |
| 61 | 60 | ||
| @@ -197,46 +196,8 @@ public class PrivateChatActivity extends AppCompatActivity implements View.OnCli | @@ -197,46 +196,8 @@ public class PrivateChatActivity extends AppCompatActivity implements View.OnCli | ||
| 197 | }; | 196 | }; |
| 198 | 197 | ||
| 199 | 198 | ||
| 200 | - //聊天室操作 | ||
| 201 | - private IChat.OnChatRoomActionListener chatRoomActionListener = new IChat.OnChatRoomActionListener() { | ||
| 202 | - @Override | ||
| 203 | - public void onJoining(String s) { | ||
| 204 | - Log.i(TAG, "私聊chatRoomActionListener" + " onJoined" + s); | ||
| 205 | - | ||
| 206 | - } | ||
| 207 | - | ||
| 208 | - @Override | ||
| 209 | - public void onJoined(String s) { | ||
| 210 | - Log.i(TAG, "私聊chatRoomActionListener " + "onJoined" + s); | ||
| 211 | - | ||
| 212 | - } | ||
| 213 | - | ||
| 214 | - @Override | ||
| 215 | - public void onQuited(String s) { | ||
| 216 | - Log.i(TAG, "私聊chatRoomActionListener " + "onQuited" + s); | ||
| 217 | - | ||
| 218 | - } | ||
| 219 | - | ||
| 220 | - @Override | ||
| 221 | - public void onError(String s, int i, String s1) { | ||
| 222 | - Log.i(TAG, "私聊chatRoomActionListener " + "onError" + s); | ||
| 223 | - | ||
| 224 | - } | ||
| 225 | - }; | ||
| 226 | 199 | ||
| 227 | 200 | ||
| 228 | - //获取历史消息监听 | ||
| 229 | -// private IChat.OnLatestMessageListener latestMessageListener = new IChat.OnLatestMessageListener() { | ||
| 230 | -// @Override | ||
| 231 | -// public void onSuccess(List<CNMessage> list) { | ||
| 232 | -// | ||
| 233 | -// } | ||
| 234 | -// | ||
| 235 | -// @Override | ||
| 236 | -// public void onError(int i, String s) { | ||
| 237 | -// | ||
| 238 | -// } | ||
| 239 | -// }; | ||
| 240 | 201 | ||
| 241 | 202 | ||
| 242 | @Override | 203 | @Override |