消息列表功能

dev
李桢 2 years ago
parent fa940d8587
commit ddb2cd3aca
  1. 49
      app/src/main/java/com/unionmed/unionmedtv/activity/DoctorDetailActivity.java
  2. 15
      app/src/main/java/com/unionmed/unionmedtv/activity/HomeActivity.java
  3. 53
      app/src/main/java/com/unionmed/unionmedtv/activity/MsgActivity.java
  4. 150
      app/src/main/java/com/unionmed/unionmedtv/adapter/MsgItemAdapter.java
  5. 21
      app/src/main/java/com/unionmed/unionmedtv/adapter/MsgListAdapter.java
  6. 3
      app/src/main/java/com/unionmed/unionmedtv/application/MyApplication.java
  7. 95
      app/src/main/java/com/unionmed/unionmedtv/fragment/MsgFragment.java
  8. 3
      app/src/main/java/com/unionmed/unionmedtv/fragment/MyDoctorFragment.java
  9. 308
      app/src/main/java/com/unionmed/unionmedtv/im/MeetingMsgModel.java
  10. 2
      app/src/main/java/com/unionmed/unionmedtv/login/activity/fragment/LoginPhoneFragment.java
  11. 30
      app/src/main/res/layout/activity_msg.xml
  12. 2
      app/src/main/res/layout/fragment_phone_login.xml
  13. 10
      app/src/main/res/layout/item_msg_text_left_layout.xml
  14. 10
      app/src/main/res/layout/item_msg_text_right_layout.xml
  15. 71
      app/src/main/res/layout/item_msg_unknown_left_layout.xml
  16. 71
      app/src/main/res/layout/item_msg_unknown_right_layout.xml
  17. 82
      app/src/main/res/layout/item_msg_video_left_layout.xml
  18. 81
      app/src/main/res/layout/item_msg_video_right_layout.xml
  19. 38
      app/src/main/res/layout/layout_appointment_record_empty.xml
  20. BIN
      app/src/main/res/mipmap-xhdpi/icon_appointment_record_empty.png

@ -126,7 +126,7 @@ public class DoctorDetailActivity extends BaseActivity implements View.OnClickLi
//所属医院
tv_affiliation_hospital.setText("所属医院: " + choscodeInfoBean.getChosname());
if (TextUtils.isEmpty(choscodeInfoBean.getJj())
||choscodeInfoBean.getJj().equals("null")) {
|| choscodeInfoBean.getJj().equals("null")) {
tv_doctor_brief.setText("医生简介: 暂无医生简介");
} else {
tv_doctor_brief.setText("医生简介: " + choscodeInfoBean.getJj());
@ -184,32 +184,33 @@ public class DoctorDetailActivity extends BaseActivity implements View.OnClickLi
return;
}
if (checkCamera(DoctorDetailActivity.this)) {
List<String> pKeys = new ArrayList<>();
pKeys.add(targetId);
EasyHttp.post(DoctorDetailActivity.this)
.api(new ApplyVideoApi(pKeys, "10001"))
.request(new OnHttpListener<ApiResponse<ApiResponse<ApplyVideoApi.ApplyVideoModel>>>() {
@Override
public void onSucceed(ApiResponse<ApiResponse<ApplyVideoApi.ApplyVideoModel>> result) {
if (null != result.getData() && result.getData().isInnerRequestSucceed() &&
null != result.getData().getData()) {
VideoCallActivity.startActivity(DoctorDetailActivity.this, targetId,
result.getData().getData().getGroupID(), VideoCallActivity.CALL);
} else {
ToastUtils.showLong("发起视频失败");
LogUtils.e("applyVideo失败", "数据解析失败");
if (HomeActivity.connectIsSuccess(DoctorDetailActivity.this)) {
List<String> pKeys = new ArrayList<>();
pKeys.add(targetId);
EasyHttp.post(DoctorDetailActivity.this)
.api(new ApplyVideoApi(pKeys, "10001"))
.request(new OnHttpListener<ApiResponse<ApiResponse<ApplyVideoApi.ApplyVideoModel>>>() {
@Override
public void onSucceed(ApiResponse<ApiResponse<ApplyVideoApi.ApplyVideoModel>> result) {
if (null != result.getData() && result.getData().isInnerRequestSucceed() &&
null != result.getData().getData()) {
VideoCallActivity.startActivity(DoctorDetailActivity.this, targetId,
result.getData().getData().getGroupID(), VideoCallActivity.CALL);
} else {
ToastUtils.showLong("发起视频失败");
LogUtils.e("applyVideo失败", "数据解析失败");
}
}
}
@Override
public void onFail(Exception e) {
ToastUtils.showLong("发起视频失败");
LogUtils.e("applyVideo失败", "失败:" + e);
}
});
@Override
public void onFail(Exception e) {
ToastUtils.showLong("发起视频失败");
LogUtils.e("applyVideo失败", "失败:" + e);
}
});
}
}
}

@ -161,7 +161,16 @@ public class HomeActivity extends BaseActivity implements View.OnFocusChangeList
});
}
public static boolean connectIsSuccess(Context context) {
if (!RongIMClient.getInstance()
.getCurrentConnectionStatus()
.equals(RongIMClient.ConnectionStatusListener.ConnectionStatus.CONNECTED)) {
ToastUtils.showLong( "融云未登录");
return false;
} else {
return true;
}
}
@Override
public void onFocusChange(View view, boolean b) {
if (view.getId() == R.id.tv_my_doctor) {
@ -198,7 +207,9 @@ public class HomeActivity extends BaseActivity implements View.OnFocusChangeList
} else if (view.getId() == R.id.tv_city) {
AddressSelectActivity.StartActivity(HomeActivity.this);
} else if (view.getId() == R.id.iv_msg) {
MsgActivity.StartActivity(HomeActivity.this);
if(HomeActivity.connectIsSuccess(HomeActivity.this)) {
MsgActivity.StartActivity(HomeActivity.this);
}
}
}

@ -6,6 +6,7 @@ import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
@ -23,6 +24,7 @@ import androidx.viewpager2.widget.ViewPager2;
import com.blankj.utilcode.util.LogUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.example.yideng.loaddialoglibrary.LmiotDialog;
import com.hjq.http.EasyHttp;
import com.hjq.http.listener.OnHttpListener;
import com.unionmed.unionmedtv.R;
@ -58,7 +60,10 @@ public class MsgActivity extends BaseActivity {
private FrameLayout frameLayout;
private TextView tv_title;
private int lastSelectedPosition = 0;
private MsgFragment msgFragment;
private LinearLayout lin;
private TextView tv_retry;
private TextView tv_content;
public static void StartActivity(Context context) {
Intent intent = new Intent(context, MsgActivity.class);
context.startActivity(intent);
@ -70,19 +75,24 @@ public class MsgActivity extends BaseActivity {
setContentView(R.layout.activity_msg);
initView();
}
public void initView() {
recyclerView = findViewById(R.id.recyclerView);
tv_title = findViewById(R.id.tv_title);
MyLinearLayoutManager myLinearLayoutManager = new MyLinearLayoutManager(MsgActivity.this);
recyclerView.setLayoutManager(myLinearLayoutManager);
public void getMsgList(){
LmiotDialog.show(MsgActivity.this,"获取聊天数据");
Conversation.ConversationType[] conversationTypes = {Conversation.ConversationType.PRIVATE, Conversation.ConversationType.GROUP};
RongIMClient.getInstance().getConversationListByPage(new RongIMClient.
ResultCallback<List<Conversation>>() {
@Override
public void onSuccess(List<Conversation> conversations) {
LmiotDialog.hidden();
if(conversations==null){
tv_content.setText("暂无数据");
return;
}
lin.setVisibility(View.GONE);
for (int i=0;i<conversations.size();i++){
if(i==0){
msgFragment.setTargetId(conversations.get(i).getTargetId());
}
MyConversation myConversation=new MyConversation();
myConversation.setConversation(conversations.get(i));
list.add(myConversation);
@ -92,10 +102,26 @@ public class MsgActivity extends BaseActivity {
@Override
public void onError(RongIMClient.ErrorCode ErrorCode) {
LmiotDialog.hidden();
lin.setVisibility(View.VISIBLE);
tv_content.setText("获取数据失败");
}
}, 0, 20, conversationTypes);
}
public void initView() {
recyclerView = findViewById(R.id.recyclerView);
tv_title = findViewById(R.id.tv_title);
lin=findViewById(R.id.lin);
tv_retry=findViewById(R.id.tv_retry);
tv_content=findViewById(R.id.tv_content);
tv_retry.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getMsgList();
}
});
MyLinearLayoutManager myLinearLayoutManager = new MyLinearLayoutManager(MsgActivity.this);
recyclerView.setLayoutManager(myLinearLayoutManager);
msgListAdapter = new MsgListAdapter(R.layout.item_msg_list_layout, list, new OnChildClickListener() {
@Override
public <T> void onChildClick(View view, int position, T data) {
@ -104,8 +130,10 @@ public class MsgActivity extends BaseActivity {
recyclerView.setAdapter(msgListAdapter);
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.framelayout, new MsgFragment());
msgFragment=new MsgFragment();
fragmentTransaction.replace(R.id.framelayout, msgFragment);
fragmentTransaction.commit();
getMsgList();
LiveDataBus.get().with(Constants.MSG_LIST_SELECT_ITEM, Integer.class).observe(this, new Observer<Integer>() {
@Override
@ -113,7 +141,12 @@ public class MsgActivity extends BaseActivity {
lastSelectedPosition = integer;
msgListAdapter.setPostion(lastSelectedPosition);
msgListAdapter.notifyDataSetChanged();
tv_title.setText(list.get(integer).getName());
msgFragment.setTargetId(list.get(integer).getConversation().getTargetId());
msgFragment.setName(list.get(integer).getName());
msgFragment.setImgPath(list.get(integer).getImgPath());
LiveDataBus.get().with(Constants.MSG_REFRESH_ITEM).postValue("");
}
});
LiveDataBus.get().with(Constants.MSG_LIST_REFRESH_ITEM, String.class).observe(this, new Observer<String>() {

@ -1,6 +1,7 @@
package com.unionmed.unionmedtv.adapter;
import android.graphics.Color;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
@ -8,6 +9,7 @@ import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.blankj.utilcode.util.TimeUtils;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseDelegateMultiAdapter;
@ -15,72 +17,162 @@ import com.chad.library.adapter.base.delegate.BaseMultiTypeDelegate;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.unionmed.unionmedtv.R;
import com.unionmed.unionmedtv.activity.MsgActivity;
import com.unionmed.unionmedtv.im.MeetingMsgModel;
import com.unionmed.unionmedtv.utils.CacheUtil;
import com.unionmed.unionmedtv.utils.OnChildClickListener;
import org.jetbrains.annotations.NotNull;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
public class MsgItemAdapter extends BaseDelegateMultiAdapter<String, BaseViewHolder> {
import io.rong.imlib.model.Message;
import io.rong.imlib.model.UnknownMessage;
import io.rong.message.ImageMessage;
import io.rong.message.TextMessage;
public class MsgItemAdapter extends BaseDelegateMultiAdapter<Message, BaseViewHolder> {
private OnChildClickListener onChildClickListener;
private String name;
private String imgPath;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
public MsgItemAdapter(@Nullable List<String> data, OnChildClickListener onChildClickListener) {
public MsgItemAdapter(@Nullable List<Message> data, OnChildClickListener onChildClickListener) {
super(data);
this.onChildClickListener = onChildClickListener;
setMultiTypeDelegate(new BaseMultiTypeDelegate<String>() {
setMultiTypeDelegate(new BaseMultiTypeDelegate<Message>() {
@Override
public int getItemType(@NotNull List<? extends String> data, int position) {
public int getItemType(@NotNull List<? extends Message> data, int position) {
// 根据数据,自己判断应该返回的类型
if (data.get(position).equals("1")) {
Message message = data.get(position);
if (message.getContent() instanceof TextMessage &&
message.getMessageDirection() == Message.MessageDirection.RECEIVE) {//文本类型发送方
return 0;
} else if (data.get(position).equals("2")) {
} else if (message.getContent() instanceof TextMessage &&
message.getMessageDirection() == Message.MessageDirection.SEND) {//文本类型接收方
return 1;
} else if (data.get(position).equals("3")) {
} else if (message.getContent() instanceof ImageMessage &&
message.getMessageDirection() == Message.MessageDirection.RECEIVE) {
return 2;
} else if (data.get(position).equals("4")) {
} else if (message.getContent() instanceof ImageMessage &&
message.getMessageDirection() == Message.MessageDirection.SEND) {
return 3;
} else if (data.get(position).equals("5")) {
} else if (message.getContent() instanceof MeetingMsgModel &&
message.getMessageDirection() == Message.MessageDirection.RECEIVE) {
return 4;
} else if (data.get(position).equals("6")) {
} else if (message.getContent() instanceof MeetingMsgModel &&
message.getMessageDirection() == Message.MessageDirection.SEND) {
return 5;
}else if (message.getContent() instanceof UnknownMessage &&
message.getMessageDirection() == Message.MessageDirection.RECEIVE) {
return 6;
} else if (message.getContent() instanceof UnknownMessage &&
message.getMessageDirection() == Message.MessageDirection.SEND) {
return 7;
} else {
return 0;
}
}
});
getMultiTypeDelegate()
.addItemType(0, R.layout.item_msg_text_left_layout)
.addItemType(0, R.layout.item_msg_text_left_layout)//文本类型
.addItemType(1, R.layout.item_msg_text_right_layout)
.addItemType(2, R.layout.item_msg_image_left_layout)
.addItemType(2, R.layout.item_msg_image_left_layout)//图片类型
.addItemType(3, R.layout.item_msg_image_right_layout)
.addItemType(4, R.layout.item_msg_order_left_layout)
.addItemType(5, R.layout.item_msg_order_right_layout);
.addItemType(4, R.layout.item_msg_video_left_layout)//视频类型
.addItemType(5, R.layout.item_msg_video_right_layout)
.addItemType(6, R.layout.item_msg_order_left_layout)//订单类型
.addItemType(7, R.layout.item_msg_order_right_layout)
.addItemType(8, R.layout.item_msg_unknown_left_layout)//未知类型
.addItemType(9, R.layout.item_msg_unknown_right_layout);
}
@Override
protected void convert(@NotNull BaseViewHolder vh, String s) {
if (vh.getItemViewType() == 0) {
} else if (vh.getItemViewType() == 2) {
ImageView iv_imag = vh.findView(R.id.iv_image);
protected void convert(@NotNull BaseViewHolder vh, Message message) {
TextView tv_time = vh.findView(R.id.tv_time);
TextView tv_name = vh.findView(R.id.tv_name);
ImageView iv_avatar = vh.findView(R.id.iv_avatar);
tv_time.setText(TimeUtils.millis2String(message.getSentTime()) + "");
if (message.getMessageDirection() == Message.MessageDirection.SEND) {//右边样式
tv_name.setText(CacheUtil.getToken().getName());
Glide.with(getContext())
.load((CacheUtil.getToken().getHeadImg()))
.apply(new RequestOptions()
.placeholder(R.drawable.icon_default_doctor)
.circleCrop()
)
.into(iv_avatar);
if (vh.getItemViewType() == 1) {//文本
TextView tv_content = vh.findView(R.id.tv_content);
TextMessage textMessage = (TextMessage) message.getContent();
tv_content.setText(textMessage.getContent());
} else if (vh.getItemViewType() == 3) {//图片
ImageView iv_imag = vh.findView(R.id.iv_image);
ImageMessage imageMessage = (ImageMessage) message.getContent();
Glide.with(getContext())
.load((imageMessage.getRemoteUri()))
.apply(new RequestOptions()
.placeholder(R.color.white_e1e1e1)
)
.into(iv_imag);
} else if (vh.getItemViewType() == 5) {//视频
TextView tv_content = vh.findView(R.id.tv_content);
TextView tv_title = vh.findView(R.id.tv_title);
MeetingMsgModel meetingMsgModel = (MeetingMsgModel) message.getContent();
tv_title.setText(meetingMsgModel.getTitle());
tv_content.setText(meetingMsgModel.getText());
}
} else {//左边样式
tv_name.setText(name);
Glide.with(getContext())
.load("https://lmg.jj20.com/up/allimg/4k/s/02/210924233115O14-0-lp.jpg")
.load(imgPath)
.apply(new RequestOptions()
.placeholder(R.color.white_e1e1e1)
.placeholder(R.drawable.icon_default_doctor)
.circleCrop()
)
.into(iv_imag);
.into(iv_avatar);
if (vh.getItemViewType() == 0) {//文本
TextView tv_content = vh.findView(R.id.tv_content);
TextMessage textMessage = (TextMessage) message.getContent();
tv_content.setText(textMessage.getContent());
} else if (vh.getItemViewType() == 2) {//图片
ImageView iv_imag = vh.findView(R.id.iv_image);
ImageMessage imageMessage = (ImageMessage) message.getContent();
Glide.with(getContext())
.load((imageMessage.getRemoteUri()))
.apply(new RequestOptions()
.placeholder(R.color.white_e1e1e1)
)
.into(iv_imag);
} else if (vh.getItemViewType() == 4) {//视频
TextView tv_content = vh.findView(R.id.tv_content);
TextView tv_title = vh.findView(R.id.tv_title);
MeetingMsgModel meetingMsgModel = (MeetingMsgModel) message.getContent();
tv_title.setText(meetingMsgModel.getTitle());
tv_content.setText(meetingMsgModel.getText());
}
}
// TextView tv_content=vh.findView(R.id.tv_content);
// if(getContext() instanceof MsgActivity){
// RecyclerView recyclerView=((MsgActivity) getContext()).findViewById(R.id.recyclerView);
// tv_content.setNextFocusLeftId(recyclerView.getId());
// }
vh.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onChildClickListener.onChildClick(view, vh.getLayoutPosition(), s);
onChildClickListener.onChildClick(view, vh.getLayoutPosition(), message);
}
});

@ -63,19 +63,15 @@ public class MsgListAdapter extends BaseQuickAdapter<MyConversation, BaseViewHol
.request(new OnHttpListener<ApiResponse<ApiResponse<ImUserInfoBean>>>() {
@Override
public void onSucceed(ApiResponse<ApiResponse<ImUserInfoBean>> result) {
if(postion==0){
LiveDataBus.get().with(Constants.MSG_LIST_SELECT_ITEM).postValue(0);
}
conversation.setFirstLoad(false);
if (null != result.getData() && result.getData().isInnerRequestSucceed()
&& null != result.getData().getData()) {
conversation.setName(result.getData().getData().getName());
conversation.setImgPath(result.getData().getData().getHeadImg());
tv_title.setText(conversation.getName());
Glide.with(getContext())
.load(conversation.getImgPath())
.apply(new RequestOptions()
.placeholder(R.mipmap.rc_default_portrait)
.circleCrop()
)
.into(iv_avatar);
notifyDataSetChanged();
}
}
@ -89,6 +85,14 @@ public class MsgListAdapter extends BaseQuickAdapter<MyConversation, BaseViewHol
protected void convert(@NotNull BaseViewHolder vh, MyConversation conversation) {
TextView tv_title = vh.findView(R.id.tv_title);
ImageView iv_avatar = vh.findView(R.id.iv_avatar);
tv_title.setText(conversation.getName());
Glide.with(getContext())
.load(conversation.getImgPath())
.apply(new RequestOptions()
.placeholder(R.mipmap.rc_default_portrait)
.circleCrop()
)
.into(iv_avatar);
ConstraintLayout constraintlayout = vh.findView(R.id.constraintlayout);
if (vh.getLayoutPosition() == postion) {
constraintlayout.setSelected(true);
@ -97,7 +101,6 @@ public class MsgListAdapter extends BaseQuickAdapter<MyConversation, BaseViewHol
constraintlayout.setSelected(false);
constraintlayout.clearFocus();
}
Log.i("TAG", "convert: ==================="+conversation.getConversation().getTargetId());
if(conversation.isFirstLoad()){
getUserInfoByServer(conversation, tv_title,iv_avatar);
}

@ -18,6 +18,7 @@ import com.tencent.mmkv.MMKV;
import com.unionmed.unionmedtv.R;
import com.unionmed.unionmedtv.activity.DoctorDetailActivity;
import com.unionmed.unionmedtv.activity.VideoCallActivity;
import com.unionmed.unionmedtv.im.MeetingMsgModel;
import com.unionmed.unionmedtv.livedatas.LiveDataBus;
import com.unionmed.unionmedtv.network.RequestHandler;
import com.unionmed.unionmedtv.network.RequestServer;
@ -69,9 +70,11 @@ public class MyApplication extends Application {
.into();
//zxing初始化
ZXingLibrary.initDisplayOpinion(this);
setSSL_Rong();
//初始化im
initRong();
RongIMClient.registerMessageType(MeetingMsgModel.class);
}
private SSLContext mySSLContext;

@ -2,6 +2,7 @@ package com.unionmed.unionmedtv.fragment;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -24,15 +25,48 @@ import com.unionmed.unionmedtv.utils.MsgItemLinearLayoutManager;
import com.unionmed.unionmedtv.utils.OnChildClickListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
import io.rong.message.TextMessage;
public class MsgFragment extends Fragment implements View.OnClickListener {
private RecyclerView recyclerView;
private MsgItemAdapter msgItemAdapter;
private List<String> list = new ArrayList<>();
private List<Message> list = new ArrayList<>();
private LinearLayout lin;
private TextView tv_look;
private String targetId;
private String name;
private String imgPath;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
public String getTargetId() {
return targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -54,19 +88,29 @@ public class MsgFragment extends Fragment implements View.OnClickListener {
msgItemLinearLayoutManager.setRecyclerView(recyclerView);
recyclerView.setLayoutManager(msgItemLinearLayoutManager);
recyclerView.addItemDecoration(new LinearSpacingItemDecoration(getActivity(), 14));
list.clear();
list.add("1");
list.add("2");
list.add("3");
list.add("4");
list.add("5");
list.add("6");
// list.clear();
// list.add("1");
// list.add("2");
// list.add("3");
// list.add("4");
// list.add("5");
// list.add("6");
msgItemAdapter = new MsgItemAdapter(list, new OnChildClickListener() {
@Override
public <T> void onChildClick(View view, int position, T data) {
}
});
View emptyView = LayoutInflater.from(getActivity())
.inflate(
R.layout.layout_appointment_record_empty,
recyclerView,
false
);
TextView tv_hint = emptyView.findViewById(R.id.tv_hint);
tv_hint.setText("暂无聊天记录");
msgItemAdapter.setEmptyView(emptyView);
recyclerView.setAdapter(msgItemAdapter);
if (list.size() > 0) {
recyclerView.smoothScrollToPosition(list.size() - 1);
@ -86,7 +130,7 @@ public class MsgFragment extends Fragment implements View.OnClickListener {
View selectView = msgItemLinearLayoutManager.findViewByPosition(pos);
if (selectView != null) {
selectView.requestFocus();
}else {
} else {
recyclerView.requestFocus();
}
} else {
@ -103,12 +147,41 @@ public class MsgFragment extends Fragment implements View.OnClickListener {
public void onChanged(String s) {
lin.setVisibility(View.VISIBLE);
recyclerView.setVisibility(View.GONE);
msgItemAdapter.setName(name);
msgItemAdapter.setImgPath(imgPath);
// LmiotDialog.show(getActivity());
}
});
return view;
}
public void getRemoteHistory() {
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
long dateTime = 0;
int count = 20;
RongIMClient.getInstance().getHistoryMessages(conversationType, targetId, -1, count, new RongIMClient.ResultCallback<List<Message>>() {
@Override
public void onSuccess(List<Message> messages) {
for (int i=0;i<messages.size();i++){
Log.i("TAG", "onSuccess: ==============="+messages.get(i).getContent());
}
LmiotDialog.hidden();
Collections.reverse(messages);
list.addAll(messages);
msgItemAdapter.notifyDataSetChanged();
recyclerView.requestFocus();
LiveDataBus.get().with(Constants.MSG_SELECT_ITEM).postValue(0);
}
@Override
public void onError(RongIMClient.ErrorCode e) {
LmiotDialog.hidden();
}
});
}
@Override
public void onClick(View view) {
if (view.getId() == R.id.tv_look) {
@ -116,7 +189,9 @@ public class MsgFragment extends Fragment implements View.OnClickListener {
lin.clearFocus();
recyclerView.setVisibility(View.VISIBLE);
recyclerView.clearFocus();
LiveDataBus.get().with(Constants.MSG_SELECT_ITEM).postValue(0);
LmiotDialog.show(getActivity(), "获取聊天记录中");
list.clear();
getRemoteHistory();
}
}
}

@ -96,6 +96,9 @@ public class MyDoctorFragment extends Fragment implements View.OnClickListener {
LogUtils.e("成功:" + stringHttpData);
if (stringHttpData.isRequestSucceed()) {
if(stringHttpData.getData().isInnerRequestSucceed()){
if(stringHttpData.getData().getData()==null){
return;
}
List<GetContractedDoctorApi.DoctorInfo.MemberBean> doctorInfo = stringHttpData.getData().getData().getMember();
if (doctorInfo.size()==0) {
tv_title.setVisibility(View.GONE);

@ -0,0 +1,308 @@
package com.unionmed.unionmedtv.im;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.UnsupportedEncodingException;
import io.rong.common.ParcelUtils;
import io.rong.imlib.MessageTag;
import io.rong.imlib.model.MentionedInfo;
import io.rong.imlib.model.MessageContent;
import io.rong.imlib.model.UserInfo;
@MessageTag(value = "UMCustonMessage", flag = MessageTag.ISCOUNTED)
public class MeetingMsgModel extends MessageContent {
private static final String TAG = "MeetingMsgModel";
public static final Creator<MeetingMsgModel> CREATOR = new Creator<MeetingMsgModel>() {
public MeetingMsgModel createFromParcel(Parcel source) {
return new MeetingMsgModel(source);
}
public MeetingMsgModel[] newArray(int size) {
return new MeetingMsgModel[size];
}
};
private String content;
private String contentType;
private String ext;
private String logo;
private String text;
private String title;
private String url;
/**
* 将本地消息对象序列化为消息数据
*
* @return 消息数据
*/
@Override
public byte[] encode() {
JSONObject jsonObj = new JSONObject();
try {
// 消息携带用户信息时, 自定义消息需添加下面代码
if (getJSONUserInfo() != null) {
jsonObj.putOpt("user", getJSONUserInfo());
}
// 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码
if (getJsonMentionInfo() != null) {
jsonObj.putOpt("mentionedInfo", getJsonMentionInfo());
}
// 将所有自定义消息的内容,都序列化至 json 对象中
jsonObj.put("content", this.content);
jsonObj.put("contentType", this.contentType);
jsonObj.put("logo", this.logo);
jsonObj.put("text", this.text);
jsonObj.put("title", this.title);
jsonObj.put("url", this.url);
jsonObj.put("ext", this.ext);
} catch (JSONException e) {
Log.e(TAG, "JSONException " + e.getMessage());
}
try {
return jsonObj.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
Log.e(TAG, "UnsupportedEncodingException ", e);
}
return null;
}
/**
* 创建 MyMyTextContent(byte[] data) 带有 byte[] 的构造方法用于解析消息内容.
*/
public MeetingMsgModel(byte[] data) {
if (data == null) {
return;
}
String jsonStr = null;
try {
jsonStr = new String(data, "UTF-8");
} catch (UnsupportedEncodingException e) {
Log.e(TAG, "UnsupportedEncodingException ", e);
}
if (jsonStr == null) {
Log.e(TAG, "jsonStr is null ");
return;
}
try {
JSONObject jsonObj = new JSONObject(jsonStr);
// 消息携带用户信息时, 自定义消息需添加下面代码
if (jsonObj.has("user")) {
setUserInfo(parseJsonToUserInfo(jsonObj.getJSONObject("user")));
}
// 用于群组聊天, 消息携带 @ 人信息时, 自定义消息需添加下面代码
if (jsonObj.has("mentionedInfo")) {
setMentionedInfo(parseJsonToMentionInfo(jsonObj.getJSONObject("mentionedInfo")));
}
// 将所有自定义变量从收到的 json 解析并赋值
if (jsonObj.has("content")) {
content = jsonObj.optString("content");
}
if (jsonObj.has("contentType")) {
contentType = jsonObj.optString("contentType");
}
if (jsonObj.has("logo")) {
logo = jsonObj.optString("logo");
}
if (jsonObj.has("text")) {
text = jsonObj.optString("text");
}
if (jsonObj.has("title")) {
title = jsonObj.optString("title");
}
if (jsonObj.has("url")) {
url = jsonObj.optString("url");
}
if (jsonObj.has("ext")) {
ext = jsonObj.optString("ext");
}
// if (jsonObj.has("ext")) {
// setExt(parseJsonToExt(jsonObj.getJSONObject("ext")));
// }
} catch (JSONException e) {
Log.e(TAG, "JSONException " + e.getMessage());
}
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
ParcelUtils.writeToParcel(dest, this.getExtra());
ParcelUtils.writeToParcel(dest, this.getUserInfo());
ParcelUtils.writeToParcel(dest, this.getMentionedInfo());
ParcelUtils.writeToParcel(dest, this.isDestruct() ? 1 : 0);
ParcelUtils.writeToParcel(dest, this.getDestructTime());
ParcelUtils.writeToParcel(dest, this.content);
ParcelUtils.writeToParcel(dest, this.contentType);
ParcelUtils.writeToParcel(dest, this.logo);
ParcelUtils.writeToParcel(dest, this.text);
ParcelUtils.writeToParcel(dest, this.title);
ParcelUtils.writeToParcel(dest, this.url);
ParcelUtils.writeToParcel(dest, this.ext);
}
public ExtBean parseJsonToExt(JSONObject jsonObj) {
ExtBean info = null;
String roomID = jsonObj.optString("roomID");
String GroupID = jsonObj.optString("GroupID");
if (!TextUtils.isEmpty(roomID) && !TextUtils.isEmpty(GroupID)) {
info = new ExtBean(roomID, GroupID);
}
return info;
}
/**
* 构造函数
*
* @param in 初始化传入的 Parcel
*/
public MeetingMsgModel(Parcel in) {
this.setExtra(ParcelUtils.readFromParcel(in));
this.setUserInfo((UserInfo) ParcelUtils.readFromParcel(in, UserInfo.class));
this.setMentionedInfo((MentionedInfo) ParcelUtils.readFromParcel(in, MentionedInfo.class));
this.setDestruct(ParcelUtils.readIntFromParcel(in) == 1);
this.setDestructTime(ParcelUtils.readLongFromParcel(in));
this.setContent(ParcelUtils.readFromParcel(in));
this.setContentType(ParcelUtils.readFromParcel(in));
this.setLogo(ParcelUtils.readFromParcel(in));
this.setText(ParcelUtils.readFromParcel(in));
this.setTitle(ParcelUtils.readFromParcel(in));
this.setUrl(ParcelUtils.readFromParcel(in));
this.setExt(ParcelUtils.readFromParcel(in));
// this.setExt((ExtBean) ParcelUtils.readFromParcel(in, ExtBean.class));
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public String getExt() {
return ext;
}
public void setExt(String ext) {
this.ext = ext;
}
public String getLogo() {
return logo;
}
public void setLogo(String logo) {
this.logo = logo;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public static class ExtBean implements Parcelable {
private String roomID;
private String groupID;
public String getRoomID() {
return roomID;
}
public void setRoomID(String roomID) {
this.roomID = roomID;
}
public String getGroupID() {
return groupID;
}
public void setGroupID(String groupID) {
groupID = groupID;
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.roomID);
dest.writeString(this.groupID);
}
public void readFromParcel(Parcel source) {
this.roomID = source.readString();
this.groupID = source.readString();
}
public ExtBean(String roomID, String groupID) {
this.roomID = roomID;
this.groupID = groupID;
}
protected ExtBean(Parcel in) {
this.roomID = in.readString();
this.groupID = in.readString();
}
public static final Creator<ExtBean> CREATOR = new Creator<ExtBean>() {
@Override
public ExtBean createFromParcel(Parcel source) {
return new ExtBean(source);
}
@Override
public ExtBean[] newArray(int size) {
return new ExtBean[size];
}
};
}
}

@ -270,7 +270,7 @@ public class LoginPhoneFragment extends Fragment implements View.OnClickListener
}
});
}
}, 0, 5000); // 设置定时任务的时间间隔为 5
}, 0, 3000); // 设置定时任务的时间间隔为3
}
@Override

@ -4,6 +4,36 @@
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/lin"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center">
<TextView
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="25sp"
android:text="暂无聊天数据"/>
<TextView
android:id="@+id/tv_retry"
style="@style/FocusStyle"
android:layout_marginTop="25dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/account_password_select"
android:layout_marginBottom="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingLeft="64dp"
android:paddingRight="64dp"
android:textSize="25sp"
android:textColor="@color/white"
android:text="点击重试"/>
</LinearLayout>
<LinearLayout
android:layout_width="275dp"

@ -120,7 +120,7 @@
android:visibility="gone"
android:layout_width="206dp"
android:layout_height="206dp"
android:padding="5dp"
android:padding="10dp"
style="@style/FocusStyle"
android:background="@drawable/edit_phone_select"
android:layout_alignTop="@+id/lly_input"

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/FocusStyle"
android:descendantFocusability="afterDescendants"
>
android:descendantFocusability="afterDescendants">
<ImageView
android:id="@+id/iv_avatar"
@ -44,17 +44,17 @@
<TextView
android:id="@+id/tv_content"
style="@style/FocusStyle"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="17dp"
android:layout_marginRight="130dp"
android:maxWidth="800dp"
android:background="@drawable/account_password_select"
android:padding="16dp"
android:text="通知文案通知文案通知文案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案"
tools:text="通知文案通知文案通知文案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案"
android:nextFocusRight="@+id/tv_content"
android:textSize="16sp"
android:textColor="@color/white_f1f1f1"
app:layout_constraintLeft_toLeftOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/FocusStyle"
android:descendantFocusability="afterDescendants"
>
android:descendantFocusability="afterDescendants">
<ImageView
android:id="@+id/iv_avatar"
@ -44,17 +44,17 @@
<TextView
android:id="@+id/tv_content"
style="@style/FocusStyle"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="17dp"
android:layout_marginLeft="130dp"
android:maxWidth="800dp"
android:background="@drawable/account_password_select"
android:padding="16dp"
android:text="通知文案通知文案通知文案通知文案通知文案通知文案通知文案 通知文案通知文案通知文案"
tools:text="通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通通知文案通"
android:nextFocusRight="@+id/tv_content"
android:textSize="16sp"
android:textColor="@color/white_f1f1f1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/FocusStyle"
android:descendantFocusability="afterDescendants">
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="47dp"
android:src="@color/design_default_color_background"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:text="通知"
android:textColor="@color/white_f1f1f1"
android:textSize="21sp"
app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:text="2023-05-30 26:30:25"
android:textColor="@color/white_f1f1f1"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="130dp"
android:layout_marginTop="17dp"
style="@style/FocusStyle"
android:background="@drawable/account_password_select"
android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name">
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
android:text="当前版本暂不支持查看此消息"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="afterDescendants"
style="@style/FocusStyle"
>
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginRight="47dp"
android:src="@color/design_default_color_background"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:text="通知"
android:textColor="@color/white_f1f1f1"
android:textSize="21sp"
app:layout_constraintRight_toLeftOf="@+id/iv_avatar"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:text="2023-05-30 26:30:25"
android:textColor="@color/white_f1f1f1"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="130dp"
android:layout_marginTop="17dp"
style="@style/FocusStyle"
android:gravity="center"
android:background="@drawable/account_password_select"
android:orientation="vertical"
app:layout_constraintRight_toRightOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name">
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
android:text="当前版本暂不支持查看此消息"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/FocusStyle"
android:descendantFocusability="afterDescendants">
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="47dp"
android:src="@color/design_default_color_background"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:text="通知"
android:textColor="@color/white_f1f1f1"
android:textSize="21sp"
app:layout_constraintLeft_toRightOf="@+id/iv_avatar"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:text="2023-05-30 26:30:25"
android:textColor="@color/white_f1f1f1"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintLeft_toRightOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="130dp"
android:layout_marginTop="17dp"
style="@style/FocusStyle"
android:background="@drawable/account_password_select"
android:orientation="vertical"
app:layout_constraintLeft_toLeftOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name">
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
android:text="视频邀请"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:lineSpacingExtra="10dp"
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
tools:text="朱亚狮发起了《2023-07-06朱亚狮远程咨询》"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/constraintlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="afterDescendants"
style="@style/FocusStyle">
<ImageView
android:id="@+id/iv_avatar"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginRight="47dp"
android:src="@color/design_default_color_background"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:text="通知"
android:textColor="@color/white_f1f1f1"
android:textSize="21sp"
app:layout_constraintRight_toLeftOf="@+id/iv_avatar"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_time"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="12dp"
android:text="2023-05-30 26:30:25"
android:textColor="@color/white_f1f1f1"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/tv_name"
app:layout_constraintRight_toLeftOf="@+id/tv_name"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_name" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="130dp"
android:layout_marginTop="17dp"
style="@style/FocusStyle"
android:gravity="right"
android:background="@drawable/account_password_select"
android:orientation="vertical"
app:layout_constraintRight_toRightOf="@+id/tv_name"
app:layout_constraintTop_toBottomOf="@+id/tv_name">
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
android:text="视频邀请"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
<TextView
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:id="@+id/tv_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:nextFocusRight="@+id/tv_content"
android:lineSpacingExtra="10dp"
tools:text="朱亚狮发起了《2023-07-06朱亚狮远程咨询》"
android:textColor="@color/white_f1f1f1"
android:textSize="16sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/icon_appointment_record_empty"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_hint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:text="暂无预约记录"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="#FF999999"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Loading…
Cancel
Save