Skip to content

Commit

Permalink
search single chat message
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed May 21, 2019
1 parent ca015d1 commit 31b7870
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import cn.wildfire.chat.kit.conversationlist.ConversationListViewModel;
import cn.wildfire.chat.kit.conversationlist.ConversationListViewModelFactory;
import cn.wildfire.chat.kit.group.AddGroupMemberActivity;
import cn.wildfire.chat.kit.search.SearchMessageActivity;
import cn.wildfire.chat.kit.user.UserInfoActivity;
import cn.wildfire.chat.kit.user.UserViewModel;
import cn.wildfirechat.chat.R;
Expand Down Expand Up @@ -103,6 +104,12 @@ void clearMessage() {
conversationViewModel.clearConversationMessage(conversationInfo.conversation);
}

@OnClick(R.id.searchMessageOptionItemView)
void searchGroupMessage() {
Intent intent = new Intent(getActivity(), SearchMessageActivity.class);
intent.putExtra("conversation", conversationInfo.conversation);
startActivity(intent);
}

@Override
public void onUserMemberClick(UserInfo userInfo) {
Expand Down
27 changes: 10 additions & 17 deletions chat/src/main/res/layout/conversation_info_group_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,24 +122,17 @@
tools:visibility="visible" />
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/option_item_margin_top"
android:background="@color/white"
android:orientation="vertical"
android:visibility="visible">

<com.lqr.optionitemview.OptionItemView
android:id="@+id/searchMessageOptionItemView"
style="@style/OptionItem"
android:background="@drawable/selector_option_item"
app:left_text="查找聊天记录"
app:left_text_color="@color/black0"
app:left_text_margin_left="@dimen/option_item_margin_left"
app:left_text_size="16sp"
tools:visibility="visible" />
</LinearLayout>
<com.lqr.optionitemview.OptionItemView
android:id="@+id/searchMessageOptionItemView"
style="@style/OptionItem"
android:layout_marginTop="@dimen/option_item_margin_top"
android:background="@drawable/selector_option_item"
app:left_text="查找聊天记录"
app:left_text_color="@color/black0"
app:left_text_margin_left="@dimen/option_item_margin_left"
app:left_text_size="16sp"
tools:visibility="visible" />

<LinearLayout
android:layout_width="match_parent"
Expand Down
13 changes: 13 additions & 0 deletions chat/src/main/res/layout/conversation_info_single_fragment.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray5"
Expand Down Expand Up @@ -107,6 +108,18 @@

</LinearLayout>


<com.lqr.optionitemview.OptionItemView
android:id="@+id/searchMessageOptionItemView"
style="@style/OptionItem"
android:layout_marginTop="@dimen/option_item_margin_top"
android:background="@drawable/selector_option_item"
app:left_text="查找聊天记录"
app:left_text_color="@color/black0"
app:left_text_margin_left="@dimen/option_item_margin_left"
app:left_text_size="16sp"
tools:visibility="visible" />

<com.lqr.optionitemview.OptionItemView
android:id="@+id/clearMessagesOptionItemView"
style="@style/OptionItem"
Expand Down

0 comments on commit 31b7870

Please sign in to comment.