11111
This commit is contained in:
@@ -50,10 +50,13 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
|
||||
mEditText.setFilters(new InputFilter[]{
|
||||
new InputFilter.LengthFilter(10)
|
||||
});
|
||||
String content = InstructorRemarkManager.get(mContext).getInstructorRemark().get(userId);
|
||||
findViewById(R.id.btn_save).setOnClickListener(this);
|
||||
mEditText.setText(content);
|
||||
mEditText.setSelection(content.length());
|
||||
String content = InstructorRemarkManager.get(mContext).getInstructorRemark().get(userId);
|
||||
if (!TextUtils.isEmpty(content)){
|
||||
mEditText.setText(content);
|
||||
mEditText.setSelection(content.length());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +96,7 @@ public class EditNameRemarksActivity extends AbsActivity implements View.OnClick
|
||||
if (code == 0 && info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
SearchUserBean userBean = JSON.toJavaObject(obj, SearchUserBean.class);
|
||||
String userNiceName = userBean.getUserNiceName() + "(" + remark + ")";
|
||||
String userNiceName = remark;
|
||||
UserInfo userInfo = new UserInfo(userId, userNiceName, Uri.parse(userBean.getAvatar()));
|
||||
//使用空白字段存储自己服务器用户的所有的信息
|
||||
userInfo.setExtra(GsonUtils.toJson(userBean));
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import io.rong.imkit.conversation.ConversationFragment;
|
||||
import io.rong.imkit.userinfo.RongUserInfoManager;
|
||||
import io.rong.imlib.model.UserInfo;
|
||||
|
||||
@@ -66,7 +65,7 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
|
||||
super.main();
|
||||
EventBus.getDefault().register(this);
|
||||
mContext = this;
|
||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
// getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
initView();
|
||||
initData();
|
||||
}
|
||||
@@ -100,33 +99,37 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl
|
||||
* 初始化布局
|
||||
*/
|
||||
private void initView() {
|
||||
// 添加会话界面
|
||||
conversationFragment = new PDLiveConversationFragment();
|
||||
FragmentManager manager = getSupportFragmentManager();
|
||||
FragmentTransaction transaction = manager.beginTransaction();
|
||||
transaction.replace(R.id.container, conversationFragment);
|
||||
transaction.commit();
|
||||
inputPanel = findViewById(R.id.input_panel);
|
||||
titleView = findViewById(R.id.titleView);
|
||||
imgMore = findViewById(R.id.img_more);
|
||||
imBack = findViewById(R.id.btn_back);
|
||||
findViewById(R.id.root_layout).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
InputMethodManager imm = (InputMethodManager)
|
||||
getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||
}
|
||||
});
|
||||
imgMore.setOnClickListener(this);
|
||||
imBack.setOnClickListener(this);
|
||||
try {
|
||||
// 添加会话界面
|
||||
conversationFragment = new PDLiveConversationFragment();
|
||||
FragmentManager manager = getSupportFragmentManager();
|
||||
FragmentTransaction transaction = manager.beginTransaction();
|
||||
transaction.replace(R.id.container, conversationFragment);
|
||||
transaction.commit();
|
||||
inputPanel = findViewById(R.id.input_panel);
|
||||
titleView = findViewById(R.id.titleView);
|
||||
imgMore = findViewById(R.id.img_more);
|
||||
imBack = findViewById(R.id.btn_back);
|
||||
findViewById(R.id.root_layout).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
InputMethodManager imm = (InputMethodManager)
|
||||
getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
|
||||
}
|
||||
});
|
||||
imgMore.setOnClickListener(this);
|
||||
imBack.setOnClickListener(this);
|
||||
|
||||
inputPanel.addMediaMessageCallback(new InputPanelViewHolder.MediaMessageCallback() {
|
||||
@Override
|
||||
public void choosePic(int intoIndex) {
|
||||
jumpPic(intoIndex);
|
||||
}
|
||||
});
|
||||
inputPanel.addMediaMessageCallback(new InputPanelViewHolder.MediaMessageCallback() {
|
||||
@Override
|
||||
public void choosePic(int intoIndex) {
|
||||
jumpPic(intoIndex);
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,12 +28,15 @@ public class PDLiveMessageListAdapter extends MessageListAdapter {
|
||||
Message.SentStatus sentStatus = mDataList.get(position).getMessage().getSentStatus();
|
||||
ImageView readReceipt = holder.getConvertView().findViewById(R.id.rc_read_receipt);
|
||||
ImageView readReceiptNew = holder.getConvertView().findViewById(R.id.rc_read_receipt_new);
|
||||
if (readReceipt.getVisibility() == View.VISIBLE) {
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_read);
|
||||
} else {
|
||||
if (messageDirection.equals(Message.MessageDirection.SEND)&&sentStatus.equals(Message.SentStatus.SENT))
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_unread);
|
||||
if (readReceipt!=null&&readReceiptNew!=null){
|
||||
if (readReceipt.getVisibility() == View.VISIBLE) {
|
||||
readReceipt.setVisibility(View.GONE);
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_read);
|
||||
} else {
|
||||
if (messageDirection.equals(Message.MessageDirection.SEND)&&sentStatus.equals(Message.SentStatus.SENT))
|
||||
readReceiptNew.setBackgroundResource(R.mipmap.icon_message_unread);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ public class InputPanelViewHolder extends LinearLayout implements View.OnClickLi
|
||||
|
||||
@Override
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
|
||||
ToastUtil.show(errorCode.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user