Switch search to use the existing header.

Probably best to not try out any possible new design changes just yet.
Let's stick with what we have.
This commit is contained in:
Greyson Parrelli 2018-05-23 11:06:07 -04:00
parent 6d56447de2
commit 92a64f59a4
3 changed files with 2 additions and 28 deletions
res
src/org/thoughtcrime/securesms/search

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/grey_200"/>
</shape>
</item>
<item android:top="1dp">
<shape android:shape="rectangle" >
<solid android:color="?attr/search_background" />
</shape>
</item>
</layer-list>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
style="@style/Base.TextAppearance.AppCompat.Body2"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="8dp"
android:background="@drawable/header_search_background"
tools:text="Conversations">
</TextView>

@ -97,7 +97,7 @@ class SearchListAdapter extends RecyclerView.Adapter<SearchListAdapter.Search
@Override
public HeaderViewHolder onCreateHeaderViewHolder(ViewGroup parent) {
return new HeaderViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.header_search_result, parent, false));
.inflate(R.layout.contact_selection_list_divider, parent, false));
}
@Override
@ -199,7 +199,7 @@ class SearchListAdapter extends RecyclerView.Adapter<SearchListAdapter.Search
public HeaderViewHolder(View itemView) {
super(itemView);
titleView = (TextView) itemView;
titleView = itemView.findViewById(R.id.label);
}
public void bind(int headerType) {