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 a639fd5ea..008587ef0 100644 --- a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java @@ -75,6 +75,8 @@ public class MainConversationListAdapter extends ConversationListAdapter { } public void setFilter(int mFilter) { + if (this.mFilter == mFilter) + return; this.mFilter = mFilter; super.setDataCollection(FilterData(mFilter, allDataList)); } diff --git a/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java b/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java index 183bc5b84..4165676c4 100644 --- a/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java +++ b/common/src/main/java/com/yunbao/common/views/MsgChatTypeSelectPoPupView.java @@ -87,21 +87,23 @@ public class MsgChatTypeSelectPoPupView extends AttachPopupView implements andro @Override public void onClick(android.view.View v) { if (v.getId()==R.id.chatTypeImg1){ - mResultCallBack.callBack(MainConversationListAdapter.FILTER_ALL); + mResultCallBack.callBack(MainConversationListAdapter.FILTER_ALL,chatTypeTv1.getText().toString()); }else if (v.getId()==R.id.chatTypeImg2){ - mResultCallBack.callBack(MainConversationListAdapter.FILTER_ONLINE); + mResultCallBack.callBack(MainConversationListAdapter.FILTER_ONLINE,chatTypeTv2.getText().toString()); }else if (v.getId()==R.id.chatTypeImg3){ - mResultCallBack.callBack(MainConversationListAdapter.FILTER_OFFLINE); + mResultCallBack.callBack(MainConversationListAdapter.FILTER_OFFLINE,chatTypeTv3.getText().toString()); }else if (v.getId()==R.id.chatTypeImg4){ - mResultCallBack.callBack(MainConversationListAdapter.FILTER_READ); + mResultCallBack.callBack(MainConversationListAdapter.FILTER_READ,chatTypeTv4.getText().toString()); }else if (v.getId()==R.id.chatTypeImg5){ - mResultCallBack.callBack(MainConversationListAdapter.FILTER_UNREAD); + mResultCallBack.callBack(MainConversationListAdapter.FILTER_UNREAD,chatTypeTv5.getText().toString()); } dismiss(); } + + public interface ResultCallBack { - void callBack(int i); + void callBack(int i,String string); } } 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 index 2ae32ab29..644c8b8cf 100644 --- a/common/src/main/res/layout/view_msg_select_chat_type.xml +++ b/common/src/main/res/layout/view_msg_select_chat_type.xml @@ -2,7 +2,7 @@ @@ -13,11 +13,12 @@ android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_weight="1" + android:text="@string/all_chats" android:textColor="#777777" - tools:textColor="@color/colorMainTab" + android:textSize="14sp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - android:text="@string/all_chats" /> + tools:textColor="@color/colorMainTab" /> + app:layout_constraintTop_toTopOf="@+id/chatTypeTv1" + tools:src="@mipmap/ic_chat_type_select" /> + app:layout_constraintTop_toBottomOf="@+id/chatTypeTv1" /> + app:layout_constraintTop_toBottomOf="@+id/chatTypeTv2" /> + app:layout_constraintTop_toBottomOf="@+id/chatTypeTv3" /> + app:layout_constraintTop_toBottomOf="@+id/chatTypeTv4" />