Commit d1a049fa by 刘鹏

feat: 消息类型32兼容新展示界面

parent 110d9a4e
......@@ -467,7 +467,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachPleaseSubscribeConsultDate.class, MsgViewHolderPleaseSubscribeConsultDate.class);//请预约咨询时间
NimUIKit.registerMsgItemViewHolder(CustomCustomerServiceCardAttachment.class, MsgViewHolderCustomerServiceCard.class);//客服小壹名片
NimUIKit.registerMsgItemViewHolder(CustomAttachmentShareMsg.class, MsgViewHolderShareMsg.class);//分享推送
NimUIKit.registerMsgItemViewHolder(CustomAttachConsultCallStatus.class, MsgViewHolderConsultCallStatus.class);//咨询声网的拨打状态
NimUIKit.registerMsgItemViewHolder(CustomAttachConsultCallStatus.class, MsgViewHolderConsultCallStatus.class);//咨询声网的拨打状态 32
NimUIKit.registerMsgItemViewHolder(CustomAttachAssistantReceivedMoney.class, MsgViewHolderAssistantReceivedMoney.class);
NimUIKit.registerMsgItemViewHolder(CustomAttachmentBusinessCard.class, MsgViewHolderBusinessCard.class);//专家自定义名片 ,TYPE=34
NimUIKit.registerMsgItemViewHolder(CustomAttachmentJumpToDaoYi.class, MsgViewHolderJumpToDaoYi.class);//跳转导医聊天窗口触发导医分配逻辑,TYPE=35
......
......@@ -15,7 +15,8 @@ import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase;
*/
public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
private ImageView typeImage;
private ImageView typeImageLeft;
private ImageView typeImageRight;
private TextView statusLabel;
public MsgViewHolderConsultCallStatus(BaseMultiItemFetchLoadAdapter adapter) {
......@@ -29,7 +30,8 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
@Override
protected void inflateContentView() {
typeImage = findViewById(R.id.type_img);
typeImageLeft = findViewById(R.id.type_img_left);
typeImageRight = findViewById(R.id.type_img_right);
statusLabel = findViewById(R.id.tv_state);
}
......@@ -43,20 +45,16 @@ public class MsgViewHolderConsultCallStatus extends MsgViewHolderBase {
private void layoutByDirection(CustomAttachConsultCallStatus customAttachTipMsg) {
if (isReceivedMessage()) {
typeImage.setImageResource(R.drawable.im_avchat_left_type_audio);
typeImageLeft.setVisibility(View.VISIBLE);
typeImageRight.setVisibility(View.GONE);
} else {
typeImage.setImageResource(R.drawable.im_avchat_right_type_audio);
typeImageLeft.setVisibility(View.GONE);
typeImageRight.setVisibility(View.VISIBLE);
}
if (TextUtils.equals("1", customAttachTipMsg.getStatus())) {
typeImage.setVisibility(View.VISIBLE);
if ("true".equals(customAttachTipMsg.getIsConsultOrder())) {
statusLabel.setText("通话接听时长 " + customAttachTipMsg.getDuration());
} else {
statusLabel.setText("通话拨打时长 " + customAttachTipMsg.getDuration());
}
statusLabel.setText(customAttachTipMsg.getDuration());
} else {
typeImage.setVisibility(View.GONE);
if (isReceivedMessage()) {
statusLabel.setText(customAttachTipMsg.getCallee());
} else {
......
......@@ -9,14 +9,15 @@
android:orientation="horizontal">
<ImageView
android:id="@+id/type_img"
android:id="@+id/type_img_left"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:contentDescription="@string/im_empty"
android:src="@drawable/im_avchat_left_type_audio"/>
android:visibility="gone"
android:src="@drawable/im_avchat_type_audio"/>
<TextView
android:id="@+id/tv_state"
......@@ -28,4 +29,15 @@
android:text="无人接听"
android:textColor="@color/platform_color_242424"
android:textSize="14sp"/>
<ImageView
android:visibility="gone"
android:id="@+id/type_img_right"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:contentDescription="@string/im_empty"
android:src="@drawable/im_avchat_type_audio"/>
</LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment