From 7fb4a104259068433d753418fbe579d88f7c4719 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Tue, 27 Aug 2024 14:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=A4=A9=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/MainConversationListAdapter.java | 151 +++++++++++++++-- .../fragment/MainMessageChatListFragment.java | 8 + .../views/MsgChatTypeSelectPoPupView.java | 107 ++++++++++++ common/src/main/res/drawable/green_dot.xml | 11 ++ common/src/main/res/drawable/red_dot.xml | 10 ++ common/src/main/res/drawable/shape_white.xml | 6 + .../res/layout/rc_conversation_type_item.xml | 29 ++++ .../res/layout/rc_conversationlist_item.xml | 2 +- .../res/layout/rc_conversationlist_item2.xml | 156 ++++++++++++++++++ .../res/layout/view_msg_select_chat_type.xml | 128 ++++++++++++++ .../res/mipmap-mdpi/ic_chat_type_select.png | Bin 0 -> 642 bytes .../res/mipmap-mdpi/ic_chat_type_unselect.png | Bin 0 -> 542 bytes .../res/mipmap-xxhdpi/ic_chat_type_select.png | Bin 0 -> 2654 bytes .../mipmap-xxhdpi/ic_chat_type_unselect.png | Bin 0 -> 2179 bytes .../mipmap-xxxhdpi/ic_chat_type_select.png | Bin 0 -> 2055 bytes .../mipmap-xxxhdpi/ic_chat_type_unselect.png | Bin 0 -> 1713 bytes common/src/main/res/values-en-rUS/strings.xml | 7 + common/src/main/res/values-zh/strings.xml | 8 +- common/src/main/res/values/strings.xml | 8 +- .../main/views/MainMessageViewHolder.java | 59 ++++++- .../src/main/res/layout/view_main_message.xml | 73 ++++++-- .../main/res/mipmap-mdpi/ic_expend_down.png | Bin 0 -> 377 bytes .../src/main/res/mipmap-mdpi/ic_expend_up.png | Bin 0 -> 366 bytes .../main/res/mipmap-xxhdpi/ic_expend_down.png | Bin 0 -> 1009 bytes .../main/res/mipmap-xxhdpi/ic_expend_up.png | Bin 0 -> 950 bytes .../res/mipmap-xxxhdpi/ic_expend_down.png | Bin 0 -> 455 bytes .../main/res/mipmap-xxxhdpi/ic_expend_up.png | Bin 0 -> 433 bytes 27 files changed, 721 insertions(+), 42 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java create mode 100644 common/src/main/res/drawable/green_dot.xml create mode 100644 common/src/main/res/drawable/red_dot.xml create mode 100644 common/src/main/res/drawable/shape_white.xml create mode 100644 common/src/main/res/layout/rc_conversation_type_item.xml create mode 100644 common/src/main/res/layout/rc_conversationlist_item2.xml create mode 100644 common/src/main/res/layout/view_msg_select_chat_type.xml create mode 100644 common/src/main/res/mipmap-mdpi/ic_chat_type_select.png create mode 100644 common/src/main/res/mipmap-mdpi/ic_chat_type_unselect.png create mode 100644 common/src/main/res/mipmap-xxhdpi/ic_chat_type_select.png create mode 100644 common/src/main/res/mipmap-xxhdpi/ic_chat_type_unselect.png create mode 100644 common/src/main/res/mipmap-xxxhdpi/ic_chat_type_select.png create mode 100644 common/src/main/res/mipmap-xxxhdpi/ic_chat_type_unselect.png create mode 100644 main/src/main/res/mipmap-mdpi/ic_expend_down.png create mode 100644 main/src/main/res/mipmap-mdpi/ic_expend_up.png create mode 100644 main/src/main/res/mipmap-xxhdpi/ic_expend_down.png create mode 100644 main/src/main/res/mipmap-xxhdpi/ic_expend_up.png create mode 100644 main/src/main/res/mipmap-xxxhdpi/ic_expend_down.png create mode 100644 main/src/main/res/mipmap-xxxhdpi/ic_expend_up.png diff --git a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java index 50a222466..a639fd5ea 100644 --- a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java @@ -12,6 +12,7 @@ import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; import com.blankj.utilcode.util.LogUtils; import com.yunbao.common.R; @@ -27,6 +28,8 @@ import com.yunbao.common.utils.ViewUtils; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; +import org.spongycastle.jcajce.provider.asymmetric.rsa.ISOSignatureSpi; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -52,18 +55,80 @@ public class MainConversationListAdapter extends ConversationListAdapter { public static final int TYPE_SEARCH_USER = 510; public static final int TYPE_SEARCH_CHAT = 520; private List srcList; + private List allDataList; private Context mContext; private boolean isChat = true; private OnRecyclerListRefreshListener> onRefreshListener; private Map timerMap = new HashMap<>(); + + public static final int FILTER_OFFLINE = 0; + public static final int FILTER_ONLINE = 1; + public static final int FILTER_UNREAD = 2; + public static final int FILTER_READ = 4; + public static final int FILTER_ALL = 7; + + private int mFilter = FILTER_ALL; + + public int getFilter() { + return mFilter; + } + + public void setFilter(int mFilter) { + this.mFilter = mFilter; + super.setDataCollection(FilterData(mFilter, allDataList)); + } + + private List FilterData(int filterType, List data){ + List showData= new ArrayList<>();; + Log.i("MainConversationListAdapter", "FilterData: 源" + data.size()); + switch (filterType) { + case FILTER_ALL: + showData = data; + break; + case FILTER_ONLINE : + for (BaseUiConversation conversation : data) { + if ("0".equals(conversation.mCore.getDraft())) { + showData.add(conversation); + } + } + break; + case FILTER_OFFLINE: + for (BaseUiConversation conversation : data) { + if (!"0".equals(conversation.mCore.getDraft())) { + showData.add(conversation); + } + } + break; + case FILTER_READ: + for (BaseUiConversation conversation : data) { + if (conversation.mCore.getUnreadMessageCount() <= 0) { + showData.add(conversation); + } + } + break; + case FILTER_UNREAD: + for (BaseUiConversation conversation : data) { + if (conversation.mCore.getUnreadMessageCount() > 0) { + showData.add(conversation); + } + } + break; + } + Log.i("MainConversationListAdapter", "FilterData: 结果" + showData.size()); + return showData; + } + + + public MainConversationListAdapter(Context mContext) { this.mContext = mContext; } public void setSrcList(List srcList) { - this.srcList = srcList; - notifyDataSetChanged(); + this.srcList = srcList; + super.setDataCollection(FilterData(mFilter, allDataList)); + // notifyDataSetChanged(); } public void setOnRefreshListener(OnRecyclerListRefreshListener> onRefreshListener) { @@ -87,7 +152,7 @@ public class MainConversationListAdapter extends ConversationListAdapter { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_main_msg_search_chat, parent, false); holder = ViewHolder.createViewHolder(parent.getContext(), view); } else if (viewType != -200) { - View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.rc_conversationlist_item, parent, false); + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.rc_conversationlist_item2, parent, false); holder = ViewHolder.createViewHolder(parent.getContext(), view); } else { holder = super.onCreateViewHolder(parent, viewType); @@ -126,13 +191,62 @@ public class MainConversationListAdapter extends ConversationListAdapter { } else if (getItemViewType(position) == TYPE_SEARCH_TITLE) { bindTitle(holder, position); } else if (getItemViewType(position) != -200) { + bindChatNew(holder, position); super.onBindViewHolder(holder, position); + return; } if (getItemViewType(position) != -200) { bindDefault(holder, position); } } + + private void bindChatNew(ViewHolder holder, int position) { + BaseUiConversation conversation = mDataList.get(position); + ImgLoader.display(holder.getContext(), conversation.mCore.getPortraitUrl(), holder.getView(R.id.rc_conversation_portrait)); + holder.setText(R.id.rc_conversation_title, conversation.mCore.getConversationTitle()); + ((TextView) holder.getView(R.id.rc_conversation_content)).setText(ChatMsgTypeUtils.getMsg(conversation.mConversationContent.toString())); + if (conversation.mCore.getSentTime() != -1 && holder.getView(R.id.rc_conversation_date) != null) { + holder.setText(R.id.rc_conversation_date, DateFormatUtil.getDateTimeString(conversation.mCore.getSentTime(), true, holder.getContext())); + holder.getView(R.id.rc_conversation_date).setVisibility(View.VISIBLE); + } else if (holder.getView(R.id.rc_conversation_date) != null) { + holder.getView(R.id.rc_conversation_date).setVisibility(View.GONE); + } + holder.setVisible(R.id.rc_conversation_live_online, "0".equals(conversation.mCore.getDraft())); + int unReadCount = conversation.mCore.getUnreadMessageCount(); + + if (unReadCount > 0) { + holder.setVisible(R.id.rc_conversation_unread_count, true); + holder.setText(R.id.rc_conversation_unread_count, String.valueOf(unReadCount)); + holder.setTextColor(R.id.rc_conversation_unread_tv, ContextCompat.getColor(holder.itemView.getContext(), R.color.red)); + holder.setText(R.id.rc_conversation_unread_tv, WordUtil.getNewString(R.string.message_chat_msg_unread_tip)); + } else { + holder.setVisible(R.id.rc_conversation_unread_count, false); + holder.setTextColor(R.id.rc_conversation_unread_tv, ContextCompat.getColor(holder.itemView.getContext(), R.color.rc_secondary_color)); + holder.setText(R.id.rc_conversation_unread_tv, WordUtil.getNewString(R.string.message_chat_msg_read_tip)); + } + + if (holder.getView(R.id.rc_conversation_live_status) == null || IMLoginManager.get(holder.getContext()).getAnchorB() != 1) { + return; + } + Integer timer = timerMap.get(mDataList.get(position).mCore.getTargetId()); + if (timer == null) { + holder.getView(R.id.rc_conversation_live_status).setVisibility(View.GONE); + return; + } + if (timer >= 10) { + holder.setText(R.id.rc_conversation_live_status, + String.format(WordUtil.getNewString(R.string.message_chat_msg_look_live), timer) + ); + holder.getView(R.id.rc_conversation_live_status).setVisibility(View.VISIBLE); + } else { + holder.getView(R.id.rc_conversation_live_status).setVisibility(View.GONE); + } + + + } + + private void bindDefault(ViewHolder holder, int position) { BaseUiConversation conversation = mDataList.get(position); Log.i("列表", "bindDefault: 用户头像:" + conversation.mCore.getPortraitUrl()); @@ -171,6 +285,7 @@ public class MainConversationListAdapter extends ConversationListAdapter { } } + private void bindEmpty(ViewHolder holder, int position) { if (isChat) { ViewUtils.findViewById(holder.itemView, R.id.imageView, ImageView.class).setImageResource(R.mipmap.ic_message_not_chat_list); @@ -183,12 +298,13 @@ public class MainConversationListAdapter extends ConversationListAdapter { public void onFinish() { if (onRefreshListener != null) { - Log.i("聊天数据源", "设置数据源: " + mDataList.size()); - onRefreshListener.onFinish(mDataList); + Log.i("聊天数据源", "设置数据源: " + allDataList.size()); + onRefreshListener.onFinish(allDataList); } } private int listHashCode = 0; + @Override public synchronized void setDataCollection(List data) { if (data.hashCode() == listHashCode) return; @@ -236,8 +352,9 @@ public class MainConversationListAdapter extends ConversationListAdapter { } tmp.add(item); } - // ToastUtil.showDebug("消息数:"+data.size()); - super.setDataCollection(tmp); + allDataList= tmp; + List showData= FilterData(mFilter,tmp); + super.setDataCollection(showData); } private List tmpUids = new ArrayList<>(); @@ -349,15 +466,15 @@ public class MainConversationListAdapter extends ConversationListAdapter { BaseUiConversation conversation = mDataList.get(id); conversation.mCore.setSentTime(bean.getSentTime()); conversation.mCore.setUnreadMessageCount(integer); - if(bean.getContent() instanceof SightMessage){ - conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[小視頻]":"[Video]"); - }else if(bean.getContent() instanceof HQVoiceMessage){ - conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[語音]":"[Voice]"); - } else if(bean.getContent() instanceof ImageMessage){ - conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[圖片]":"[picture]"); - }else if(bean.getContent() instanceof MessageChatCardContent){ - conversation.mConversationContent = new SpannableString(WordUtil.isNewZh()?"[站內分享]":"[In-app sharing]"); - } else{ + if (bean.getContent() instanceof SightMessage) { + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh() ? "[小視頻]" : "[Video]"); + } else if (bean.getContent() instanceof HQVoiceMessage) { + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh() ? "[語音]" : "[Voice]"); + } else if (bean.getContent() instanceof ImageMessage) { + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh() ? "[圖片]" : "[picture]"); + } else if (bean.getContent() instanceof MessageChatCardContent) { + conversation.mConversationContent = new SpannableString(WordUtil.isNewZh() ? "[站內分享]" : "[In-app sharing]"); + } else { conversation.mConversationContent = new SpannableString(((TextMessage) bean.getContent()).getContent()); } mDataList.set(id, conversation); @@ -375,4 +492,6 @@ public class MainConversationListAdapter extends ConversationListAdapter { }); } + + } diff --git a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java index e479828d2..966eca9b0 100644 --- a/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/MainMessageChatListFragment.java @@ -165,6 +165,14 @@ public class MainMessageChatListFragment extends AbsMainMessageChatListFragment } + public int getFilter() { + return mAdapter.getFilter(); + } + + public void setFilter(int mFilter) { + mAdapter.setFilter(mFilter); + } + @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { diff --git a/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java b/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java new file mode 100644 index 000000000..183bc5b84 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java @@ -0,0 +1,107 @@ +package com.yunbao.common.views; + +import static io.rong.imlib.publicservice.model.PublicServiceMenu.PublicServiceMenuItemType.View; + +import android.content.Context; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; + +import com.lxj.xpopup.core.AttachPopupView; +import com.yunbao.common.R; +import com.yunbao.common.adapter.MainConversationListAdapter; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +import org.repackage.com.zui.opendeviceidlibrary.OpenDeviceId; + +public class MsgChatTypeSelectPoPupView extends AttachPopupView implements android.view.View.OnClickListener { + + private TextView chatTypeTv1, chatTypeTv2, chatTypeTv3, chatTypeTv4, chatTypeTv5; + private ImageView chatTypeImg1, chatTypeImg2, chatTypeImg3, chatTypeImg4, chatTypeImg5; + + private ResultCallBack mResultCallBack; + private int lastType; + public MsgChatTypeSelectPoPupView(@NonNull Context context,int type, ResultCallBack itemDelListener) { + super(context); + mResultCallBack = itemDelListener; + lastType = type; + } + + @Override + protected int getImplLayoutId() { + return R.layout.view_msg_select_chat_type; + } + + @Override + protected void onCreate() { + chatTypeTv1 =findViewById(R.id.chatTypeTv1); + chatTypeImg1 =findViewById(R.id.chatTypeImg1); + chatTypeTv2 =findViewById(R.id.chatTypeTv2); + chatTypeImg2 =findViewById(R.id.chatTypeImg2); + chatTypeTv3 =findViewById(R.id.chatTypeTv3); + chatTypeImg3 =findViewById(R.id.chatTypeImg3); + chatTypeTv4 =findViewById(R.id.chatTypeTv4); + chatTypeImg4 =findViewById(R.id.chatTypeImg4); + chatTypeTv5 =findViewById(R.id.chatTypeTv5); + chatTypeImg5 =findViewById(R.id.chatTypeImg5); + + chatTypeImg1.setOnClickListener(this); + chatTypeImg2.setOnClickListener(this); + chatTypeImg3.setOnClickListener(this); + chatTypeImg4.setOnClickListener(this); + chatTypeImg5.setOnClickListener(this); + + handleChatTypeClick(lastType); + } + + + + private void handleChatTypeClick(int type) { + switch (type) { + case MainConversationListAdapter.FILTER_ALL: + chatTypeImg1.setImageResource(R.mipmap.ic_chat_type_select); + chatTypeTv1.setTextColor(ContextCompat.getColor(chatTypeTv1.getContext(),R.color.colorMainTab)); + break; + case MainConversationListAdapter.FILTER_ONLINE: + chatTypeImg2.setImageResource(R.mipmap.ic_chat_type_select); + chatTypeTv2.setTextColor(ContextCompat.getColor(chatTypeTv2.getContext(),R.color.colorMainTab)); + break; + case MainConversationListAdapter.FILTER_OFFLINE: + chatTypeImg3.setImageResource(R.mipmap.ic_chat_type_select); + chatTypeTv3.setTextColor(ContextCompat.getColor(chatTypeTv3.getContext(),R.color.colorMainTab)); + break; + case MainConversationListAdapter.FILTER_READ: + chatTypeImg4.setImageResource(R.mipmap.ic_chat_type_select); + chatTypeTv4.setTextColor(ContextCompat.getColor(chatTypeTv4.getContext(),R.color.colorMainTab)); + break; + case MainConversationListAdapter.FILTER_UNREAD: + chatTypeImg5.setImageResource(R.mipmap.ic_chat_type_select); + chatTypeTv5.setTextColor(ContextCompat.getColor(chatTypeTv5.getContext(),R.color.colorMainTab)); + break; + } + } + + @Override + public void onClick(android.view.View v) { + if (v.getId()==R.id.chatTypeImg1){ + mResultCallBack.callBack(MainConversationListAdapter.FILTER_ALL); + }else if (v.getId()==R.id.chatTypeImg2){ + mResultCallBack.callBack(MainConversationListAdapter.FILTER_ONLINE); + }else if (v.getId()==R.id.chatTypeImg3){ + mResultCallBack.callBack(MainConversationListAdapter.FILTER_OFFLINE); + }else if (v.getId()==R.id.chatTypeImg4){ + mResultCallBack.callBack(MainConversationListAdapter.FILTER_READ); + }else if (v.getId()==R.id.chatTypeImg5){ + mResultCallBack.callBack(MainConversationListAdapter.FILTER_UNREAD); + } + dismiss(); + } + + + public interface ResultCallBack { + void callBack(int i); + } +} diff --git a/common/src/main/res/drawable/green_dot.xml b/common/src/main/res/drawable/green_dot.xml new file mode 100644 index 000000000..46fab62ef --- /dev/null +++ b/common/src/main/res/drawable/green_dot.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/common/src/main/res/drawable/red_dot.xml b/common/src/main/res/drawable/red_dot.xml new file mode 100644 index 000000000..39d9237fe --- /dev/null +++ b/common/src/main/res/drawable/red_dot.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/common/src/main/res/drawable/shape_white.xml b/common/src/main/res/drawable/shape_white.xml new file mode 100644 index 000000000..a9043c57d --- /dev/null +++ b/common/src/main/res/drawable/shape_white.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/rc_conversation_type_item.xml b/common/src/main/res/layout/rc_conversation_type_item.xml new file mode 100644 index 000000000..5b7fe7538 --- /dev/null +++ b/common/src/main/res/layout/rc_conversation_type_item.xml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/rc_conversationlist_item.xml b/common/src/main/res/layout/rc_conversationlist_item.xml index 30703b211..da3a74afc 100644 --- a/common/src/main/res/layout/rc_conversationlist_item.xml +++ b/common/src/main/res/layout/rc_conversationlist_item.xml @@ -14,7 +14,6 @@ android:id="@+id/rc_conversation_portrait_rl" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/rc_margin_size_12" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -180,6 +179,7 @@ android:layout_marginBottom="@dimen/rc_margin_size_12" android:src="@drawable/rc_read_receipt" android:visibility="gone" + tools:visibility="visible" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/rc_conversation_no_disturb" app:layout_goneMarginRight="@dimen/rc_margin_size_12" /> diff --git a/common/src/main/res/layout/rc_conversationlist_item2.xml b/common/src/main/res/layout/rc_conversationlist_item2.xml new file mode 100644 index 000000000..188c1721b --- /dev/null +++ b/common/src/main/res/layout/rc_conversationlist_item2.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_msg_select_chat_type.xml b/common/src/main/res/layout/view_msg_select_chat_type.xml new file mode 100644 index 000000000..2ae32ab29 --- /dev/null +++ b/common/src/main/res/layout/view_msg_select_chat_type.xml @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/src/main/res/mipmap-mdpi/ic_chat_type_select.png b/common/src/main/res/mipmap-mdpi/ic_chat_type_select.png new file mode 100644 index 0000000000000000000000000000000000000000..3f5330bc3f344f1907cfcdfb74ff714b275adaa4 GIT binary patch literal 642 zcmV-|0)737P)Px%JV``BR5(wKlU+ztVHkj)_e|SQTOmbYkP#JuSA`Hne^Tit3b~-Wf(RP@3hvCV zz0Mt_q+)gx)LqaFEImrJey#$cix9*jGAf87NZp*ay>)i1L~QlleSgpQe((Fd!jhp4 z9oz8~&!8LtHkP)9H$aAhaa~5bUM#*Mzb0DW>BIZ&3K-3xmoXUN)6@jHuR?Xr7Aj}~ zIR`q7F?U`Dd-EA8L|J=d23|n>RoM z*xknkirQ$lBD90-L{x!M3eqhj$+Ut&*t`ugEp{>{dMLgFkI|1(E5pedjU>8&#Bvb; zNf}CZxRC_LDN3_w#7v>Q7Tda{4T&fo?*8SnyIj<$3|svgHZLMojHw|SrC7D0JCBz{aP2RWNm211$>@bDWiS! z8cyU8d}RS>PKK<2)*fBKhMH*yFoD5g8MMYUY(7S0-#-A)WXRfE`a&gX(MB_cEF{q> zpCRe8fI{JjjP#`cB+*gV(EH@G+Z=)ZyNtfTOA6AuAX2;!B#3PtD~Z(59>rtCfjU$K z^f^jTseC1o;k`(%h*EeLI>J|MrU&FO>R&9wNnlG+t=`e*yrqijM%QQji@ cXt{R&0q&go7V2N4V*mgE07*qoM6N<$fR literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-mdpi/ic_chat_type_unselect.png b/common/src/main/res/mipmap-mdpi/ic_chat_type_unselect.png new file mode 100644 index 0000000000000000000000000000000000000000..8f04b106f2cb4c44537e7ee50def9c9d6586f2f8 GIT binary patch literal 542 zcmV+(0^$9MP)Px$*hxe|R5(walfR1-K^(>3H=v$z14)rW8jZ99Rez7jf`w#}Q^djxq}dd^`Ee$BGT~N_a3`0WZst4h!@S`=!Q4_x ztpKnbH z2LL{%QmKdee14?0GeEQ1JQarF7RenEDOr{k&c96WE0v0o&1PKy=b|XOQ7jgRGl1uL zFGVETZny6`jx#+-9G^LklgQdn6*u;(4AX-L@>Ny$C=lWs-cS0lU8M8;;}bE&^~}_e46K zj%I*fuXm|ikX7iA5p z)oM%0Wbzq+>pJ$jOaQ(GLBLEVb4f(jNN$j9_WS(}-Gjen+V4?EdpsVmi^x>~7es^r geom*;)Px<7)eAyRA@upT6=I*)fxYN=iYq)31X49;`rzk+sa_I!jwmfMia6d9!?oxI&Cej z(5bDqG|BGbgRv}Cv2HdA+G-t3TU)g=EmS%ZlHKr_paQ{4EtLVabc(jnKhT09$Yyu% z`N}!>?wW9Sm&7Fe(KC~OviF?x{m%KGzwZ!+IJhP}27YfD(y1wc2mqK2U=o0d0Lq=^ zPXRav!dsBk1<)QCdxZ-emH-%F?!Ppt ztq2eTAOpzu_5#=ga1zr09CbYOua6?jpaF2j%5s#;#{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fnRY!l0F+;lS)(YU-@mr5u~2uS-}AVgmf8o{w8MF=%~!4L@3G1l^AS8#6!4Wn zHBaOXv-D?x`9~&weCmzwDjb6Y(e_Gxi^RoqZW@rN8KXi80V%tlodJy3=P$w3Lt*$Y lxNr_!b+R}%m(Yv9{|`93Y2JEQmT>?8002ovPDHLkV1hwL$q4`e literal 0 HcmV?d00001 diff --git a/common/src/main/res/mipmap-xxxhdpi/ic_chat_type_unselect.png b/common/src/main/res/mipmap-xxxhdpi/ic_chat_type_unselect.png new file mode 100644 index 0000000000000000000000000000000000000000..e68a3dd8f238cb75d6d2a6c6d98efe81580352ff GIT binary patch literal 1713 zcmV;i22S~jP)Px*Ye_^wRCr$PTW?M)HxOTYBR(L6!U+n!z=K|(@Gel05^wUUqzCAO6Flev`gpwn z;RA$tQS-RKd+7z*a01d3kS~dlg6(Ef?`qevvwyN17K9~)l-(WA{5&%rk7tmT^XPOs zo8$3#mvg?2G5*f7tWC?Z%JP43_P%9V1Ix1dLWn!dvU;5JUcFw2-*X!%56Z6V?lQ*q zF~&b>1Wh_60MJDUT~w>pZqkpV-p>qx^Yioa+S=L&A;ghf;i$ROJnv(SPsZc%Us-9! z!T>Bua22cpLg?)2>FHuoAQl3EQu<-S*-6BTgI$9?-w7dlwr%$qV*{1(R;vZRVH0Cq z7DDV|jNeUEe>Xx+rW#SHR4&q}6MT~j0ARLMDxCwPhKUE0XI;+u=f}s#UZc?f5E2j2 zuGQ65m}4Iy^z$47ea6^c8f{1nK*Xwp;GajM(OFudO+rcy*|lx^qrtHbIOnIeTJ0CRIAm~xFEy^fKqxs*`p6NgugJxj?<`L zTqbqzfkuG+>r4Y<+^ke8jX3mU0YEAJ$Fi(#gKC`(%Y*ZwUEMl!kIweoFAKZ2Q2`S5ZHatt_m%D1PBAh*pALoYXP8?-YfQG zB#@_Cr=?9P1&0kj!Cyd=Q=9>SQVLrgY7&X)-xP94YbcQzk@I4>t%fg-#w!)6GS zyb;m@9{`Q*_X#0eMG#^U9y*;)c|0D2Q}-QWPz!IzEJ`PFm5BBem;c&Q-bw=kogbvPWFoP}BZnq)d z1_6UNx`dF(bM$iylxBX{b-yWj%mx4eSrvbu^lT%|1V#UbQVOSA$Yf6k$cj|w@EYyk z6IhLPIOn$jKq%eiZ4X6X%{2VUQzFRgjUE6H3V>eI{;z_hark`zKm=bTghb{E)1Y6J zZ&Z2T0C>}YHxqbsg6gf$PEjsAvUZ%BQ}1*eRP$yHLP#^~$%{Zw4g0-7XeK;_V`32) z&YA}`6o$+YXh0|p9`{l)Yvz_gPdyAl*snVd&!mo*!Cc;R$m8%sa2|+ywF!~ecplIk z`~Odf03sUO_~JOuLEfvfO!}s@-xL5%y69DzfiCM6N{UJ?0Q=D9&X>7TdCaA`^SCF3 zd=GQ^C%>p0lsp()7ESfYAH4JM0f@RmSr)Td&!eew30?Jv&i*x3D0O70Z&QuEt4s->FT1Y4Yb#>$~?- zPKlIKxYhn!sd4f>e-P+bS0p8c|EknDJut?8h+QNF2B;J%o0}WxQ<^E3hJp{rao$InUMv8Bh(QzJQIj!ty6kEasq()oWpGn@~ zOl$z)15Kpp(di?Enn@ZJqE^QA{POa0V`XIpRvm76LnZQ-WeIt^Z7hyX>;u#fO!fJm zgUq_E4d{ZZUtL|5=Lin3J#fx{%e7_31H)96t$+p2^L8{Eb<{r=A zrmnceXWF3kOBypwWCE%-v|6phIZaId>yT(=jNQS1jPamUD)kQz4ni%lvc(nz+=ez= z+qT~cA)x44C$vX9)v8BEf=TRCY6GOvVXK_SY!b3j?>-12{>Y*`Z6OT^av7toElQ}U z=WvY=ZF!jpo@y6};xOPNp!4$(A@t({&C}Dmg~ Include: 看直播%dmin Chat Records + [Read] + [Unread] + All Chats + Show Online Only + Show Offline Only + Show Read Only + Show Unread Only diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index c98de881c..ebbb31de6 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1604,5 +1604,11 @@ 違規原因: 處罰內容: 處罰時間: - + [已讀] + [未讀] + 全部聊天 + 僅展示在線 + 僅展示離線 + 僅展示已讀 + 僅展示未讀 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index e59cb38c7..3c55e3931 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1412,5 +1412,11 @@ Limited ride And limited avatar frame Personal hal Whole site hal Honors - + [Read] + [Unread] + All Chats + Show Online Only + Show Offline Only + Show Read Only + Show Unread Only diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index 220d8341a..1327fe7c7 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -73,6 +73,7 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ViewPageIndicatorUtils; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.AbsMainViewHolder; +import com.yunbao.common.views.MsgChatTypeSelectPoPupView; import com.yunbao.common.views.MsgRecommendPopupView; import com.yunbao.common.views.MsgSysDelPopupView; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -134,12 +135,14 @@ public class MainMessageViewHolder extends AbsMainViewHolder { private ConstraintLayout tabLayout1, tabLayout2, tabLayout3; private TextView tab1, tab2, tab3; + private ImageView imageView1, imageView2, imageView3; private View tab_line1, tab_line2, tab_line3; private ImageView tab_icon; private List relativeLayouts = new ArrayList<>(); private List tabTexts = new ArrayList<>(); private List tabLine = new ArrayList<>(); + private List tabExpend = new ArrayList<>(); private LinearLayout tabLayouts; private int userType = 0; // (0)普通用户 (1)主播A (2)主播B @@ -201,6 +204,20 @@ public class MainMessageViewHolder extends AbsMainViewHolder { tab2 = findViewById(R.id.tab2); tab3 = findViewById(R.id.tab3); + imageView1 = findViewById(R.id.expendImg1); + imageView2 = findViewById(R.id.expendImg2); + imageView3 = findViewById(R.id.expendImg3); + + imageView1.setOnClickListener(view -> { + selectChatType(view, 0); + }); + imageView2.setOnClickListener(view -> { + selectChatType(view, 1); + }); + imageView3.setOnClickListener(view -> { + selectChatType(view, 2); + }); + tab_line1 = findViewById(R.id.tab_line1); tab_line2 = findViewById(R.id.tab_line2); tab_line3 = findViewById(R.id.tab_line3); @@ -224,6 +241,25 @@ public class MainMessageViewHolder extends AbsMainViewHolder { }); } + private void selectChatType(View view, int position) { + AbsMainMessageChatListFragment fragment = fragmentList.get(position); + if (!(fragment instanceof MainMessageChatListFragment) || !(view instanceof ImageView)) { + return; + } + MainMessageChatListFragment chatFragment = (MainMessageChatListFragment) fragment; + ImageView expendImg = (ImageView) view; + expendImg.setImageResource(R.mipmap.ic_expend_down); + XPopup.Builder builder = new XPopup.Builder(mContext).atView(relativeLayouts.get(position)); + builder.asCustom(new MsgChatTypeSelectPoPupView(mContext, chatFragment.getFilter(), new MsgChatTypeSelectPoPupView.ResultCallBack() { + @Override + public void callBack(int i) { + chatFragment.setFilter(i); + expendImg.setImageResource(R.mipmap.ic_expend_up); + } + })).show(); + } + + private void initFragment() { final String[] titles; fragmentList = new ArrayList<>(); @@ -264,9 +300,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder { return fragmentList.get(i); } }); - if(userType==1){ + if (userType == 1) { viewPager.setCurrentItem(1); - }else{ + } else { viewPager.setCurrentItem(0); } viewPager.setUserInputEnabled(false); @@ -340,7 +376,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder { @Override public void onPageSelected(int position) { super.onPageSelected(position); - if(!StringUtil.isEmpty(search.getText().toString())) { + if (!StringUtil.isEmpty(search.getText().toString())) { search.setText(""); } selectTab(position); @@ -369,6 +405,12 @@ public class MainMessageViewHolder extends AbsMainViewHolder { }); } + + private void showChatTypeSelect() { + + } + + private void initTabView() { relativeLayouts = new ArrayList<>(); tabTexts = new ArrayList<>(); @@ -382,6 +424,10 @@ public class MainMessageViewHolder extends AbsMainViewHolder { tabTexts.add(tab2); tabTexts.add(tab3); + tabExpend.add(imageView1); + tabExpend.add(imageView2); + tabExpend.add(imageView3); + tabLine.add(tab_line1); tabLine.add(tab_line2); tabLine.add(tab_line3); @@ -390,6 +436,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder { tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_all_an_a)); ViewGroup.LayoutParams params = tabLayouts.getLayoutParams(); params.width = LinearLayout.LayoutParams.WRAP_CONTENT; + tabExpend.get(0).setVisibility(View.VISIBLE); tabLayouts.setLayoutParams(params); } else if (userType == 1) {//主播A tab_icon.setVisibility(View.VISIBLE); @@ -410,7 +457,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder { tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_recommend)); relativeLayouts.get(1).setVisibility(View.VISIBLE); tabTexts.get(1).setText(WordUtil.getNewString(R.string.message_chat_msg_all_an_a)); + tabExpend.get(1).setVisibility(View.VISIBLE); } else { //主播B + tabExpend.get(0).setVisibility(View.VISIBLE); relativeLayouts.get(0).setVisibility(View.VISIBLE); tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_all)); relativeLayouts.get(1).setVisibility(View.VISIBLE); @@ -428,9 +477,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder { } }); } - if(userType==1){ + if (userType == 1) { selectTab(1); - }else{ + } else { selectTab(0); } } diff --git a/main/src/main/res/layout/view_main_message.xml b/main/src/main/res/layout/view_main_message.xml index 47097b605..ac0ba6b34 100644 --- a/main/src/main/res/layout/view_main_message.xml +++ b/main/src/main/res/layout/view_main_message.xml @@ -312,12 +312,12 @@ android:paddingEnd="20dp"> + android:layout_weight="1" + android:visibility="gone" + tools:visibility="visible"> + + + + android:layout_weight="1" + android:visibility="gone" + tools:visibility="visible"> + + android:layout_weight="1" + android:visibility="gone" + tools:visibility="visible"> + + diff --git a/main/src/main/res/mipmap-mdpi/ic_expend_down.png b/main/src/main/res/mipmap-mdpi/ic_expend_down.png new file mode 100644 index 0000000000000000000000000000000000000000..bdb75c255aede3aecf47dc39930c1b1f04049f70 GIT binary patch literal 377 zcmV-<0fzpGP)Px$Gf6~2R47x0(7j6oK@bJ-nb}=?!Nx`uKMITF_LeIw>=Z>oZ1hjC6-zrUB3Q)F zQbDY&Z3HbWtxUoh6G&+x*onvyFgvqyLPSOJmBah-V9;7Sj)=?5e3Yi?Bm5Io;Z$20N_w-J?p){ z27t9{wR-2ATLgezrPQGJeh(2hDwWF1C(N;PZa9RnqqSaO=Bp6GEdVSTV@5lj&SsWn zj!?lL0o6VaTAyb)0kGncX~+wP)YVSX$Yi(^Wu10tGX=Cb#`RIk^czdr08 XLdt}e{UV|;00000NkvXXu0mjf^p~J3 literal 0 HcmV?d00001 diff --git a/main/src/main/res/mipmap-mdpi/ic_expend_up.png b/main/src/main/res/mipmap-mdpi/ic_expend_up.png new file mode 100644 index 0000000000000000000000000000000000000000..983c252517081cdb84b709488ee1f19f0aae9ac4 GIT binary patch literal 366 zcmV-!0g?WRP)Px$C`m*?R47wzkUvYqP!z@QdBkWP(jj*1kf9%-ea#2xSacOf7Y7GXP(jp1TvP-t zCt4li z{P71@V5`-d^*rwYz!4GU%)IjpUJ{WH;J7G?)8TOVW%UZwTAu^hC8Bo`Su@5w*nrl0 z1;8B<&5Ou|F=npOKYwB0PMqWBDz7h+qEOqn0Yx((-$I=X`rpu>2&%^sYhGq2fKD^wpkych5!Hn M07*qoM6N<$f@e0O`Tzg` literal 0 HcmV?d00001 diff --git a/main/src/main/res/mipmap-xxhdpi/ic_expend_down.png b/main/src/main/res/mipmap-xxhdpi/ic_expend_down.png new file mode 100644 index 0000000000000000000000000000000000000000..2b70c60e5fb6f07bde97c842d2804fb85d9a4544 GIT binary patch literal 1009 zcmVX1^@s6sPETi00001b5ch_0Itp) z=>Px&t4TybR9HvVmQiRNRTPH*b9Z(v!H5Vx`B*6uUovx7m#|V+BZe(u5g)856^kP1 zgT;cPs1Owd1;M9+5UjSerTDNS^u;0#ibf$fyP4Hc5R|rxZKEJ;%qDYZ=9meyVRo}K zvzvq#=XLHq=ey_s?>|HMA3YRh&FAw^GxJ>lE-9r>-|Takrdbg}>;tf@wLZBCo6qOJ zWacsv8O*Gi`TI(x^3c@Olz%gzrIc?0cn!c%*#D;uSj(~w6440&xh}A(*7}fb+yCB3 zVAC|8H4J0g_dDmb0UMlxh~8o54kjT4eBVE{Zi~Z8DSab=Ez5evFpLj8&)d?j4f`B3 zf4mMXx>pbpnE8TIY8*i4X?B@jO8F*$w*hS72wH7=R!aE;fI>q5YA%<1YIb(Ewabhf z3hrN4=yEVSm$F zk9R~@p-{NZb=}X1=+Ry$3@!1MQfgwirfXT&8$|SOROM)GX8xOq9#BeM?0^jxl}e>O z%gf8(GIKu362rs8PtMHDtnLKbvaDx>5Xa-BXXX|W?Nv(s+2Pq})6f#m<+GMUV=IO&=Bvex>+Mx*g-n{CTv+b;r3c%F9>KqbKv=af>DgHBgU`TBaM zzZbWUng8-Uue7kR@N;xcENqy+!Pn!PAc_-!zG$^t2NxF?oqnMEklt}!cdu>Rzi)}r zv<6bjED>D*P>i!gkkKnED=(!12VbUaHandl{U2KE{ZZ-ro@~?-uIrv6qR9jgSCvwa z#U0+VtXGNX{RHWk06aWDKX1paNwh)NrMtD+Y|f-v0>IjsLA|ddvI*wC}lYU?uL^p&faR$JF1P`B` zo11&WG|i(zhz}DcdfoT^iF&O- z1Ltg7!O_vt+YQ4wpJIuPGR*AzzJE`>UjHSnZm;(Pr9oVSa=CoV($bOwaBsp-$v;|a zIjHnIN`pAyz!Ga~YgGW_J%F$IzCT&3)#kP{(H&o~UQNfw#_rHsSDAT#Jh027CVl-a_3T)B7A|00000NkvXXu0mjfSjgw- literal 0 HcmV?d00001 diff --git a/main/src/main/res/mipmap-xxhdpi/ic_expend_up.png b/main/src/main/res/mipmap-xxhdpi/ic_expend_up.png new file mode 100644 index 0000000000000000000000000000000000000000..d75a1b232125e5b2294d2ffa6fb896ecbd772c09 GIT binary patch literal 950 zcmV;n14;aeP)X1^@s6M=iWq00001b5ch_0Itp) z=>Px&a7jc#R9HvVmrsZkM-;~2d(}MyCP9J+2?_>Wg~+heU0r)n4=#$V=*5G2QoI;J z0uez-@GfX_i5>*egZSqV6~u!I8cjU7vopQhT?>*xR79enpac_9VY~aq3bQi1cJ|9;U|tf@`Y;S{ z&IWc?pq}S>LWti0VD1bM&xvR-3`5;5Y}cSt%CCs%_vv!mKuj7qjmh-fGb!{HA1LC2s?3o>%g>-4bZ`e%qZI669dyOaGLfl4X+5b;jY z0nEI{aU4j~^m@TME|p44Yqi?lc46BF^?hFnA#O19XO`d-S(fdH)Hggl{GjM&3qeiA zAtGbcHlIw=G~K1OK3;T)l=5ptJOTiYW!-Zj#HykSW(BQQt4m$iz0S-FZE~k+x-E*L z)9vJ#QfeC_o-9a%hs~VLZDevmtJUfP$8qifK-uyTOipgpT3>7ja&k=&1RD|YLO~k5 zc3roxR;xXl9`_y4=EJ#Vx*!XLk$bn++DO^)P)dEn%s&;R!QZayuAE-Mrhrx|mBr<9 z`4<5A(kA!B#KcamwXvP9hf-=MA|5SBgZs?9c5H0SsQUkS3tFjE=9kN5W5Ayl$h}2t zeXeW5mW@)%EkcN&3t;~hLM*A*>rdW-HY?6ZL0L?hd2bX&MzWp_rPLl~{t*Cd*7uZ| zmq$@_7lR=90sxE!EwRa+B+2eLjt}>Yuq99s1m634U z$yTlPnfC!X8FOG@U@HKe%7bnG)?7uU6kF`V$h|L$q95KTWQ%ou_ogq{Z%Kn!=0^Vl zfGMWltli(oaeVMYK(@jX(Se+seTY)ZbwqTf^;WYi+dkO^eMnGqmg%|>@x&xgQ~II* Y0NQ+07yERHH~;_u07*qoM6N<$fb%7 literal 0 HcmV?d00001 diff --git a/main/src/main/res/mipmap-xxxhdpi/ic_expend_down.png b/main/src/main/res/mipmap-xxxhdpi/ic_expend_down.png new file mode 100644 index 0000000000000000000000000000000000000000..3432b8e1b1848634e21a172b7da5d9ce80add403 GIT binary patch literal 455 zcmV;&0XY7NP)Px$fk{L`R9Hvl*xhY|Fc1LX3tk{2bOcL?_ofqcl}ywT+6_7Y5A_JyAbCgFsUsQ% zu<_p=Tou3YfF*Ho}lfXzz8Fxl=4Lg@c{r50QSGnufFe(N~zO-_!++V@5rIU z&wzV0U8<@&v~8<6L#32b2=VQT|BkHd`V#=&JrLH=1>lYIh%|wbVhIfar^vHosHbjL z&=}wpY3K86#JXbvjRlU73mcEiy(u&WXpFgxQb^M@Qfuwnq1ZrEfm-XstQg=7%>gQ< zl(XXD2+akK*5q_Pa)Oos7m@ZQ2WTlUh};^A0gOU!1;qkJBiDvv0+WzyL9v0!NNOkr zFbhcqr2=Lnv7wZ}A|w`+8d!`hg{}caLFPict^?1V%Px$Ye_^wR9Hvd*vnDFFc1ddl{LOo0wsvp1ppOL3k^|1sDKpU11fwH75*h~HZmEQg40@0T}$8h4~Y0tBFQ9R z4sMRA6fzn}fh&oO0#f2iA%lS&xDv=9ASaF+=>?X+aUxfNC2?HHtH3RA9LPoBmN;tU zA7BkQO5_EwCL9&=2UsJH0yzO|#^oZ#=~DJHq_cPPoEv%OslYeTQ9qAu(2X%W(RJM( z0A73_vo$U;$%6ypf59anM+Y3&wr4HL{SF~;yP^ZS>x0Lo6l=vrB>8^zkf|N#Ln7j6 bt=$~~rg`j6OjPy300000NkvXXu0mjf7=5o5 literal 0 HcmV?d00001