diff --git a/chatapp/libs/arm64-v8a/libjcore117.so b/chatapp/libs/arm64-v8a/libjcore117.so
deleted file mode 100644
index d1013fc8..00000000
Binary files a/chatapp/libs/arm64-v8a/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/arm64-v8a/libjcore118.so b/chatapp/libs/arm64-v8a/libjcore118.so
new file mode 100755
index 00000000..e2e6a3e7
Binary files /dev/null and b/chatapp/libs/arm64-v8a/libjcore118.so differ
diff --git a/chatapp/libs/armeabi-v7a/libjcore117.so b/chatapp/libs/armeabi-v7a/libjcore117.so
deleted file mode 100644
index 788edc8c..00000000
Binary files a/chatapp/libs/armeabi-v7a/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/armeabi-v7a/libjcore118.so b/chatapp/libs/armeabi-v7a/libjcore118.so
new file mode 100755
index 00000000..d7122904
Binary files /dev/null and b/chatapp/libs/armeabi-v7a/libjcore118.so differ
diff --git a/chatapp/libs/armeabi/libjcore117.so b/chatapp/libs/armeabi/libjcore117.so
deleted file mode 100644
index ba9781ab..00000000
Binary files a/chatapp/libs/armeabi/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/armeabi/libjcore118.so b/chatapp/libs/armeabi/libjcore118.so
new file mode 100755
index 00000000..f8ad2673
Binary files /dev/null and b/chatapp/libs/armeabi/libjcore118.so differ
diff --git a/chatapp/libs/jcore-android-1.1.7-debug-b155.jar b/chatapp/libs/jcore-android-1.1.7-debug-b155.jar
deleted file mode 100644
index 30e7fa85..00000000
Binary files a/chatapp/libs/jcore-android-1.1.7-debug-b155.jar and /dev/null differ
diff --git a/chatapp/libs/jcore-android-1.1.8.jar b/chatapp/libs/jcore-android-1.1.8.jar
new file mode 100755
index 00000000..34dcbe1b
Binary files /dev/null and b/chatapp/libs/jcore-android-1.1.8.jar differ
diff --git a/chatapp/libs/jmessage-android_debug_v2.4.0_b903.jar b/chatapp/libs/jmessage-android_debug_v2.4.0_b903.jar
deleted file mode 100644
index e68b1f5c..00000000
Binary files a/chatapp/libs/jmessage-android_debug_v2.4.0_b903.jar and /dev/null differ
diff --git a/chatapp/libs/jmessage-android_v2.4.0.jar b/chatapp/libs/jmessage-android_v2.4.0.jar
new file mode 100755
index 00000000..075f8b84
Binary files /dev/null and b/chatapp/libs/jmessage-android_v2.4.0.jar differ
diff --git a/chatapp/libs/mips/libjcore117.so b/chatapp/libs/mips/libjcore117.so
deleted file mode 100644
index d6b43f01..00000000
Binary files a/chatapp/libs/mips/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/mips/libjcore118.so b/chatapp/libs/mips/libjcore118.so
new file mode 100755
index 00000000..d433d79e
Binary files /dev/null and b/chatapp/libs/mips/libjcore118.so differ
diff --git a/chatapp/libs/mips64/libjcore117.so b/chatapp/libs/mips64/libjcore117.so
deleted file mode 100644
index 23bf0271..00000000
Binary files a/chatapp/libs/mips64/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/mips64/libjcore118.so b/chatapp/libs/mips64/libjcore118.so
new file mode 100755
index 00000000..cff09ccd
Binary files /dev/null and b/chatapp/libs/mips64/libjcore118.so differ
diff --git a/chatapp/libs/x86/libjcore117.so b/chatapp/libs/x86/libjcore117.so
deleted file mode 100644
index 8ed2290b..00000000
Binary files a/chatapp/libs/x86/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/x86/libjcore118.so b/chatapp/libs/x86/libjcore118.so
new file mode 100755
index 00000000..65308327
Binary files /dev/null and b/chatapp/libs/x86/libjcore118.so differ
diff --git a/chatapp/libs/x86_64/libjcore117.so b/chatapp/libs/x86_64/libjcore117.so
deleted file mode 100644
index e6e53a36..00000000
Binary files a/chatapp/libs/x86_64/libjcore117.so and /dev/null differ
diff --git a/chatapp/libs/x86_64/libjcore118.so b/chatapp/libs/x86_64/libjcore118.so
new file mode 100755
index 00000000..35aef5bb
Binary files /dev/null and b/chatapp/libs/x86_64/libjcore118.so differ
diff --git a/chatapp/src/main/AndroidManifest.xml b/chatapp/src/main/AndroidManifest.xml
index c1b796c3..24a7f12a 100644
--- a/chatapp/src/main/AndroidManifest.xml
+++ b/chatapp/src/main/AndroidManifest.xml
@@ -433,6 +433,7 @@
() {
@Override
@@ -405,6 +406,7 @@ private void initEmoticonsKeyBoardBar() {
ekBar.getEtChat().setOnSizeChangedListener((w, h, oldw, oldh) -> scrollToBottom());
//发送按钮
+ //发送文本消息
ekBar.getBtnSend().setOnClickListener(v -> {
String mcgContent = ekBar.getEtChat().getText().toString();
scrollToBottom();
@@ -419,6 +421,7 @@ private void initEmoticonsKeyBoardBar() {
} else if (null != mAtList) {
msg = mConv.createSendMessage(content, mAtList, null);
} else {
+ LogUtils.d("ChatActivity", "create send message conversation = " + mConv +"==content==" + content.toString());
msg = mConv.createSendMessage(content);
}
@@ -436,6 +439,7 @@ private void initEmoticonsKeyBoardBar() {
forDel.clear();
}
} else {
+ JMessageClient.sendMessage(msg);
mChatAdapter.addMsgToList(msg);
ekBar.getEtChat().setText("");
}
diff --git a/chatapp/src/main/java/jiguang/chat/activity/ChatRoomDetailActivity.java b/chatapp/src/main/java/jiguang/chat/activity/ChatRoomDetailActivity.java
index 2741d7ad..19cde57b 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/ChatRoomDetailActivity.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/ChatRoomDetailActivity.java
@@ -49,23 +49,8 @@ public void gotResult(int i, String s, List chatRoomInfos) {
mInfo = chatRoomInfos.get(0);
mChatRoomName.setText(mInfo.getName());
mChatRoomID.setText(mInfo.getRoomID() + "");
- mInfo.getDescription(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, String s2) {
- if (i == 0) {
- mChatRoomDesc.setText(s2);
- }
- }
- });
-
- mInfo.getTotalMemberCount(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, Integer integer) {
- if (i == 0) {
- mChatRoomMember.setText(integer + "");
- }
- }
- });
+ mChatRoomDesc.setText(mInfo.getDescription());
+ mChatRoomMember.setText(mInfo.getTotalMemberCount() + "");
}
}
});
diff --git a/chatapp/src/main/java/jiguang/chat/activity/ChatRoomInfoActivity.java b/chatapp/src/main/java/jiguang/chat/activity/ChatRoomInfoActivity.java
index aca5ba70..62883745 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/ChatRoomInfoActivity.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/ChatRoomInfoActivity.java
@@ -23,7 +23,7 @@ public class ChatRoomInfoActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_chat_room_info);
- initTitle(true, true, "详细资料", "", false, "");
+ initTitle(true, true, "聊天室资料", "", false, "");
mTv_chatRoomName = (TextView) findViewById(R.id.tv_chatRoomName);
tv_chatRoomID = (TextView) findViewById(R.id.tv_chatRoomID);
tv_chatRoomMember = (TextView) findViewById(R.id.tv_chatRoomMember);
@@ -39,22 +39,9 @@ public void gotResult(int i, String s, List chatRoomInfos) {
ChatRoomInfo info = chatRoomInfos.get(0);
mTv_chatRoomName.setText(info.getName());
tv_chatRoomID.setText(info.getRoomID() + "");
- info.getTotalMemberCount(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, Integer integer) {
- if (i == 0) {
- tv_chatRoomMember.setText(integer + "");
- }
- }
- });
- info.getDescription(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, String s2) {
- if (i == 0) {
- tv_chatRoomDesc.setText(s2);
- }
- }
- });
+ tv_chatRoomMember.setText(info.getTotalMemberCount() + "");
+ tv_chatRoomDesc.setText(info.getDescription());
+
}
}
});
diff --git a/chatapp/src/main/java/jiguang/chat/activity/LoginActivity.java b/chatapp/src/main/java/jiguang/chat/activity/LoginActivity.java
index b1d53f86..43c3a1c8 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/LoginActivity.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/LoginActivity.java
@@ -48,7 +48,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener,
private View mUserLine;
private View mPswLine;
//内部测试环境使用,发布时会置为false;此处对开发者来说即使打开也是没有效果的.
- private boolean isTestVisibility = true;
+ private boolean isTestVisibility = false;
private RadioGroup mRadioGroup;
private RadioButton mRelease;
private RadioButton mTest;
diff --git a/chatapp/src/main/java/jiguang/chat/activity/SearchChatRoomActivity.java b/chatapp/src/main/java/jiguang/chat/activity/SearchChatRoomActivity.java
index f83ec2f4..11fcae37 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/SearchChatRoomActivity.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/SearchChatRoomActivity.java
@@ -1,5 +1,6 @@
package jiguang.chat.activity;
+import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.MotionEvent;
@@ -17,6 +18,7 @@
import cn.jpush.im.android.api.callback.RequestCallback;
import cn.jpush.im.android.api.model.ChatRoomInfo;
import jiguang.chat.R;
+import jiguang.chat.utils.CommonUtils;
/**
* Created by ${chenyn} on 2017/11/9.
@@ -31,6 +33,7 @@ public class SearchChatRoomActivity extends BaseActivity {
private EditText mSearchEditText;
private LinearLayout mAc_iv_press_back;
private TextView mTv_search;
+ private long mRoomID;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -57,7 +60,10 @@ private void initData() {
return false;
});
- mAc_iv_press_back.setOnClickListener(v -> finish());
+ mAc_iv_press_back.setOnClickListener(v -> {
+ finish();
+ CommonUtils.hideKeyboard(SearchChatRoomActivity.this);
+ });
mTv_search.setOnClickListener(v -> {
if (!TextUtils.isEmpty(mSearchEditText.getText())) {
String roomId = mSearchEditText.getText().toString().trim();
@@ -65,16 +71,9 @@ private void initData() {
@Override
public void gotResult(int i, String s, List chatRoomInfos) {
if (i == 0) {
+ mRoomID = chatRoomInfos.get(0).getRoomID();
mLl_chatRoomItem.setVisibility(View.VISIBLE);
- chatRoomInfos.get(0).getDescription(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, String s2) {
- if ( i == 0) {
- mTv_chatRoomDesc.setText(s2);
- }
- }
- });
-
+ mTv_chatRoomDesc.setText(chatRoomInfos.get(0).getDescription());
mTv_chatRoomName.setText(chatRoomInfos.get(0).getName());
}else {
mLl_chatRoomItem.setVisibility(View.GONE);
@@ -85,6 +84,12 @@ public void gotResult(int i, String s, String s2) {
}
});
+ mLl_chatRoomItem.setOnClickListener(v -> {
+ Intent intent = new Intent(SearchChatRoomActivity.this, ChatRoomDetailActivity.class);
+ intent.putExtra("chatRoomId", mRoomID);
+ startActivity(intent);
+ });
+
}
private void initView() {
@@ -97,4 +102,5 @@ private void initView() {
mAc_iv_press_back = (LinearLayout) findViewById(R.id.ac_iv_press_back);
mSearchEditText = (EditText) findViewById(R.id.ac_et_search);
}
+
}
diff --git a/chatapp/src/main/java/jiguang/chat/activity/SelectCreateGroupTypeActivity.java b/chatapp/src/main/java/jiguang/chat/activity/SelectCreateGroupTypeActivity.java
index d67fcde4..51efb5f1 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/SelectCreateGroupTypeActivity.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/SelectCreateGroupTypeActivity.java
@@ -47,6 +47,7 @@ public class SelectCreateGroupTypeActivity extends BaseActivity implements TextW
private EditText mEt_groupName;
private LinearLayout mLl_groupType;
private TextView mTv_groupSelect;
+ private TextView tvInGroupDesc;
private Button mBtn_createGroup;
private ChoosePhoto mChoosePhoto;
private File avatarFile;
@@ -108,7 +109,7 @@ public void gotResult(int responseCode, String responseMessage) {
}
});
} else {
- JMessageClient.createRestrictedGroup(mEt_groupName.getText().toString(), "", avatarFile, "", new CreateGroupCallback() {
+ JMessageClient.createPublicGroup(mEt_groupName.getText().toString(), "", avatarFile, "", new CreateGroupCallback() {
@Override
public void gotResult(int responseCode, String responseMsg, final long groupId) {
if (responseCode == 0) {
@@ -188,6 +189,7 @@ private void initView() {
mEt_groupName = (EditText) findViewById(R.id.et_groupName);
mLl_groupType = (LinearLayout) findViewById(R.id.ll_groupType);
mTv_groupSelect = (TextView) findViewById(R.id.tv_groupSelect);
+ tvInGroupDesc = (TextView) findViewById(R.id.tvInGroupDesc);
mBtn_createGroup = (Button) findViewById(R.id.btn_createGroup);
mBtn_createGroup.setClickable(false);
@@ -217,10 +219,12 @@ public void showDialog() {
switch (v.getId()) {
case R.id.man_rl:
mTv_groupSelect.setText("私有群");
+ tvInGroupDesc.setText("只能通过群成员邀请入群,无需审核");
genderDialog.dismiss();
break;
case R.id.woman_rl:
mTv_groupSelect.setText("公开群");
+ tvInGroupDesc.setText("用户可主动申请入群,需群主审核");
genderDialog.dismiss();
break;
case R.id.rl_secrecy:
diff --git a/chatapp/src/main/java/jiguang/chat/activity/fragment/ContactsFragment.java b/chatapp/src/main/java/jiguang/chat/activity/fragment/ContactsFragment.java
index 93687f7a..205c3043 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/fragment/ContactsFragment.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/fragment/ContactsFragment.java
@@ -7,6 +7,8 @@
import android.view.View;
import android.view.ViewGroup;
+import com.google.gson.Gson;
+
import java.util.ArrayList;
import java.util.List;
@@ -23,7 +25,6 @@
import cn.jpush.im.android.api.model.GroupInfo;
import cn.jpush.im.android.api.model.UserInfo;
import cn.jpush.im.android.eventbus.EventBus;
-import cn.jpush.im.android.utils.JsonUtil;
import jiguang.chat.R;
import jiguang.chat.application.JGApplication;
import jiguang.chat.controller.ContactsController;
@@ -253,6 +254,7 @@ public void onEvent(GroupApprovalEvent event) {
@Override
public void gotResult(int i, String s, UserInfo fromUserInfo) {
if (i == 0) {
+ Gson gson = new Gson();
event.getApprovalUserInfoList(new GetUserInfoListCallback() {
@Override
public void gotResult(int i, String s, List list) {
@@ -267,12 +269,12 @@ public void gotResult(int i, String s, List list) {
if (fromUserInfo.getAvatar() != null) {
entry = new GroupApplyEntry(fromUserInfo.getUserName(), list.get(0).getUserName(), fromUserInfo.getAppKey(),
list.get(0).getAvatarFile().getPath(), fromUserInfo.getDisplayName(), list.get(0).getDisplayName(),
- null, GroupApplyInvitation.INVITED.getValue(), JsonUtil.toJson(event), gid + "",
+ null, GroupApplyInvitation.INVITED.getValue(), gson.toJson(event), gid + "",
user, 0, 0);//邀请type=0
} else {
entry = new GroupApplyEntry(fromUserInfo.getUserName(), list.get(0).getUserName(), fromUserInfo.getAppKey(),
null, fromUserInfo.getDisplayName(), list.get(0).getDisplayName(),
- null, GroupApplyInvitation.INVITED.getValue(), JsonUtil.toJson(event), gid + "",
+ null, GroupApplyInvitation.INVITED.getValue(), gson.toJson(event), gid + "",
user, 0, 0);//邀请type=0
}
} else {
@@ -283,12 +285,12 @@ public void gotResult(int i, String s, List list) {
if (fromUserInfo.getAvatar() != null) {
entry = new GroupApplyEntry(list.get(0).getUserName(), list.get(0).getUserName(), list.get(0).getAppKey(),
list.get(0).getAvatarFile().getPath(), list.get(0).getDisplayName(), list.get(0).getDisplayName(),
- event.getReason(), GroupApplyInvitation.INVITED.getValue(), JsonUtil.toJson(event), gid + "",
+ event.getReason(), GroupApplyInvitation.INVITED.getValue(), gson.toJson(event), gid + "",
user, 0, 1);//申请type=1
} else {
entry = new GroupApplyEntry(list.get(0).getUserName(), list.get(0).getUserName(), list.get(0).getAppKey(),
null, fromUserInfo.getDisplayName(), list.get(0).getDisplayName(),
- event.getReason(), GroupApplyInvitation.INVITED.getValue(), JsonUtil.toJson(event), gid + "",
+ event.getReason(), GroupApplyInvitation.INVITED.getValue(), gson.toJson(event), gid + "",
user, 0, 1);//申请type=1
}
}
diff --git a/chatapp/src/main/java/jiguang/chat/activity/fragment/ConversationListFragment.java b/chatapp/src/main/java/jiguang/chat/activity/fragment/ConversationListFragment.java
index c1677858..e8b94660 100644
--- a/chatapp/src/main/java/jiguang/chat/activity/fragment/ConversationListFragment.java
+++ b/chatapp/src/main/java/jiguang/chat/activity/fragment/ConversationListFragment.java
@@ -199,7 +199,7 @@ public void gotResult(int responseCode, String responseMessage, Bitmap avatarBit
*/
public void onEvent(OfflineMessageEvent event) {
Conversation conv = event.getConversation();
- if (!conv.getTargetId().equals("feedback_Android")) {
+ if (!conv.getTargetId().equals("feedback_Android") && conv.getType() != ConversationType.chatroom) {
mBackgroundHandler.sendMessage(mBackgroundHandler.obtainMessage(REFRESH_CONVERSATION_LIST, conv));
}
}
@@ -226,7 +226,7 @@ public void onEventMainThread(MessageReceiptStatusChangeEvent event) {
*/
public void onEvent(ConversationRefreshEvent event) {
Conversation conv = event.getConversation();
- if (!conv.getTargetId().equals("feedback_Android")) {
+ if (!conv.getTargetId().equals("feedback_Android") && conv.getType() != ConversationType.chatroom) {
mBackgroundHandler.sendMessage(mBackgroundHandler.obtainMessage(REFRESH_CONVERSATION_LIST, conv));
//多端在线未读数改变时刷新
if (event.getReason().equals(ConversationRefreshEvent.Reason.UNREAD_CNT_UPDATED)) {
@@ -246,7 +246,9 @@ public void handleMessage(android.os.Message msg) {
switch (msg.what) {
case REFRESH_CONVERSATION_LIST:
Conversation conv = (Conversation) msg.obj;
- mConvListController.getAdapter().setToTop(conv);
+ if (conv.getType() != ConversationType.chatroom) {
+ mConvListController.getAdapter().setToTop(conv);
+ }
break;
case DISMISS_REFRESH_HEADER:
mContext.runOnUiThread(new Runnable() {
diff --git a/chatapp/src/main/java/jiguang/chat/adapter/ChatRoomAdapter.java b/chatapp/src/main/java/jiguang/chat/adapter/ChatRoomAdapter.java
index fac9f6bc..79ce5a8a 100644
--- a/chatapp/src/main/java/jiguang/chat/adapter/ChatRoomAdapter.java
+++ b/chatapp/src/main/java/jiguang/chat/adapter/ChatRoomAdapter.java
@@ -10,7 +10,6 @@
import java.util.List;
-import cn.jpush.im.android.api.callback.RequestCallback;
import cn.jpush.im.android.api.model.ChatRoomInfo;
import jiguang.chat.R;
import jiguang.chat.view.ChatRoomView;
@@ -63,14 +62,8 @@ public View getView(int position, View convertView, ViewGroup viewGroup) {
ChatRoomInfo chatRoomInfo = mChatRoomInfoList.get(position);
holder.tv_chatRoomName.setText(chatRoomInfo.getName());
- chatRoomInfo.getDescription(new RequestCallback() {
- @Override
- public void gotResult(int i, String s, String s2) {
- if (i == 0) {
- holder.tv_chatRoomContent.setText(s2);
- }
- }
- });
+ holder.tv_chatRoomContent.setText(chatRoomInfo.getDescription());
+
return convertView;
}
diff --git a/chatapp/src/main/java/jiguang/chat/adapter/GroupVerificationAdapter.java b/chatapp/src/main/java/jiguang/chat/adapter/GroupVerificationAdapter.java
index 15f60a0c..c5c8af08 100644
--- a/chatapp/src/main/java/jiguang/chat/adapter/GroupVerificationAdapter.java
+++ b/chatapp/src/main/java/jiguang/chat/adapter/GroupVerificationAdapter.java
@@ -12,6 +12,8 @@
import android.widget.TextView;
import android.widget.Toast;
+import com.google.gson.Gson;
+
import java.io.File;
import java.util.List;
@@ -22,7 +24,6 @@
import cn.jpush.im.android.api.event.GroupApprovalEvent;
import cn.jpush.im.android.api.model.GroupInfo;
import cn.jpush.im.android.api.model.UserInfo;
-import cn.jpush.im.android.utils.JsonUtil;
import cn.jpush.im.api.BasicCallback;
import jiguang.chat.R;
import jiguang.chat.database.GroupApplyEntry;
@@ -123,7 +124,8 @@ public void gotResult(int i, String s, GroupInfo groupInfo) {
//申请
//0为初始状态
- GroupApprovalEvent event = JsonUtil.fromJson(entry.eventJson, GroupApprovalEvent.class);
+ Gson gson = new Gson();
+ GroupApprovalEvent event = gson.fromJson(entry.eventJson, GroupApprovalEvent.class);
if (entry.btnState == 0) {
holder.item_add_btn.setBackgroundColor(Color.parseColor("#2DD0CF"));
holder.item_add_btn.setTextColor(Color.parseColor("#FFFFFF"));
diff --git a/chatapp/src/main/java/jiguang/chat/controller/ChatDetailController.java b/chatapp/src/main/java/jiguang/chat/controller/ChatDetailController.java
index 636d1869..9c9bf2bd 100644
--- a/chatapp/src/main/java/jiguang/chat/controller/ChatDetailController.java
+++ b/chatapp/src/main/java/jiguang/chat/controller/ChatDetailController.java
@@ -42,6 +42,7 @@
import jiguang.chat.activity.GroupAvatarActivity;
import jiguang.chat.activity.GroupMemberListActivity;
import jiguang.chat.activity.GroupNotFriendActivity;
+import jiguang.chat.activity.GroupUserInfoActivity;
import jiguang.chat.activity.MainActivity;
import jiguang.chat.activity.MembersInChatActivity;
import jiguang.chat.activity.PersonalActivity;
@@ -100,6 +101,7 @@ public class ChatDetailController implements OnClickListener, OnItemClickListene
private String mAvatarPath;
private boolean mFriend;
private Long mUid;
+ private String mGroupOwnerId;
public ChatDetailController(ChatDetailView chatDetailView, ChatDetailActivity context, int size,
int width) {
@@ -134,7 +136,7 @@ public void initData() {
mChatDetailView.setMemberCount(" " + mMemberInfoList.size() + " 人");
mChatDetailView.setGroupId(mGroupId + "");
mChatDetailView.setGroupType(mGroupInfo.getGroupFlag() == 2 ? "普通群" : "私有群");
- String groupOwnerId = mGroupInfo.getGroupOwner();
+ mGroupOwnerId = mGroupInfo.getGroupOwner();
mGroupName = mGroupInfo.getGroupName();
mGroupDesc = mGroupInfo.getGroupDescription();
if (mGroupInfo.getAvatarFile() != null && mGroupInfo.getAvatarFile().exists()) {
@@ -155,7 +157,7 @@ public void initData() {
}
// 判断是否为群主
- if (groupOwnerId != null && groupOwnerId.equals(mMyUsername)) {
+ if (mGroupOwnerId != null && mGroupOwnerId.equals(mMyUsername)) {
mIsCreator = true;
}
mChatDetailView.setMyName(mMyUsername);
@@ -513,16 +515,20 @@ public void onItemClick(AdapterView> viewAdapter, View view, final int positio
intent.setClass(mContext, PersonalActivity.class);
} else {
UserInfo userInfo = mMemberInfoList.get(position);
+ intent.setClass(mContext, GroupUserInfoActivity.class);
+ intent.putExtra("groupID",mGroupId);
+ intent.putExtra("groupUserName",userInfo.getUserName());
+ intent.putExtra("groupOwner",mGroupOwnerId);
//是否是好友
- if (userInfo.isFriend()) {
- intent.setClass(mContext, FriendInfoActivity.class);
- intent.putExtra("group_grid", true);
- } else {
- intent.setClass(mContext, GroupNotFriendActivity.class);
- }
- intent.putExtra(JGApplication.TARGET_ID, userInfo.getUserName());
- intent.putExtra(JGApplication.TARGET_APP_KEY, userInfo.getAppKey());
- intent.putExtra(JGApplication.GROUP_ID, mGroupId);
+// if (userInfo.isFriend()) {
+// intent.setClass(mContext, FriendInfoActivity.class);
+// intent.putExtra("group_grid", true);
+// } else {
+// intent.setClass(mContext, GroupNotFriendActivity.class);
+// }
+// intent.putExtra(JGApplication.TARGET_ID, userInfo.getUserName());
+// intent.putExtra(JGApplication.TARGET_APP_KEY, userInfo.getAppKey());
+// intent.putExtra(JGApplication.GROUP_ID, mGroupId);
}
mContext.startActivity(intent);
// 点击添加成员按钮
diff --git a/chatapp/src/main/java/jiguang/chat/controller/ChatRoomController.java b/chatapp/src/main/java/jiguang/chat/controller/ChatRoomController.java
index 8d639a28..7bb8743e 100644
--- a/chatapp/src/main/java/jiguang/chat/controller/ChatRoomController.java
+++ b/chatapp/src/main/java/jiguang/chat/controller/ChatRoomController.java
@@ -1,5 +1,6 @@
package jiguang.chat.controller;
+import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.view.View;
@@ -14,6 +15,7 @@
import jiguang.chat.activity.ChatRoomDetailActivity;
import jiguang.chat.activity.SearchChatRoomActivity;
import jiguang.chat.adapter.ChatRoomAdapter;
+import jiguang.chat.utils.DialogCreator;
import jiguang.chat.utils.HandleResponseCode;
import jiguang.chat.view.ChatRoomView;
@@ -32,10 +34,12 @@ public ChatRoomController(ChatRoomView chatRoomView, Context context) {
}
private void initChatRoomAdapter() {
-
+ Dialog loadingDialog = DialogCreator.createLoadingDialog(mContext, "正在加载聊天室...");
+ loadingDialog.show();
ChatRoomManager.getChatRoomListByApp(0, 10, new RequestCallback>() {
@Override
public void gotResult(int i, String s, List chatRoomInfos) {
+ loadingDialog.dismiss();
if (i == 0) {
mChatRoomView.setChatRoomAdapter(new ChatRoomAdapter(mContext, chatRoomInfos, mChatRoomView));
} else {
diff --git a/chatapp/src/main/res/layout/activity_search_chat_room.xml b/chatapp/src/main/res/layout/activity_search_chat_room.xml
index 9c7b4191..c1655b65 100644
--- a/chatapp/src/main/res/layout/activity_search_chat_room.xml
+++ b/chatapp/src/main/res/layout/activity_search_chat_room.xml
@@ -48,7 +48,7 @@
android:focusableInTouchMode="true"
android:imeActionLabel=""
android:imeOptions="actionSearch"
- android:inputType="textNoSuggestions"
+ android:inputType="number"
android:maxLines="1"
android:paddingRight="6dp"
android:textColor="#000"
@@ -61,7 +61,10 @@
android:background="@color/line_normal"
android:gravity="center"
android:paddingLeft="16dp"
+ android:layout_marginTop="8dp"
+ android:layout_marginBottom="8dp"
android:paddingRight="16dp"
+ android:layout_marginRight="5dp"
android:text="搜索"
android:textColor="#fff"
android:textSize="14sp"/>
@@ -91,6 +94,7 @@
android:id="@+id/iv_chatRoomAvatar"
android:layout_width="47dp"
android:layout_height="47dp"
+ android:layout_gravity="center_vertical"
android:src="@drawable/group"/>
diff --git a/chatapp/src/main/res/layout/activity_select_create_group_type.xml b/chatapp/src/main/res/layout/activity_select_create_group_type.xml
index 39daf264..e6226dfa 100644
--- a/chatapp/src/main/res/layout/activity_select_create_group_type.xml
+++ b/chatapp/src/main/res/layout/activity_select_create_group_type.xml
@@ -117,6 +117,7 @@
android:background="#D9D9D9"/>