Commit d1a049fa by 刘鹏

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

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