diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchListAdapter.java
index efb5caa2d..abfc99bcf 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchListAdapter.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/SearchListAdapter.java
@@ -131,11 +131,15 @@ public class SearchListAdapter extends BaseAdapter {
holder.status_toot_date = (TextView) v.findViewById(R.id.status_toot_date);
holder.status_reblog_user = (TextView) v.findViewById(R.id.status_reblog_user);
holder.main_container = (LinearLayout) v.findViewById(R.id.main_container);
+ holder.status_search_title = (TextView) v.findViewById(R.id.status_search_title);
v.setTag(holder);
} else {
holder = (ViewHolderStatus) v.getTag();
}
-
+ if( isFirstTypeItem(type, position) )
+ holder.status_search_title.setVisibility(View.VISIBLE);
+ else
+ holder.status_search_title.setVisibility(View.GONE);
final float scale = context.getResources().getDisplayMetrics().density;
if( !status.getIn_reply_to_account_id().equals("null") || !status.getIn_reply_to_id().equals("null") ){
Drawable img = ContextCompat.getDrawable(context, R.drawable.ic_reply);
@@ -220,12 +224,16 @@ public class SearchListAdapter extends BaseAdapter {
holder.account_sc = (TextView) v.findViewById(R.id.account_sc);
holder.account_fgc = (TextView) v.findViewById(R.id.account_fgc);
holder.account_frc = (TextView) v.findViewById(R.id.account_frc);
-
+ holder.account_search_title = (TextView) v.findViewById(R.id.account_search_title);
v.setTag(holder);
} else {
holder = (ViewHolderAccounts) v.getTag();
}
+ if( isFirstTypeItem(type, position) )
+ holder.account_search_title.setVisibility(View.VISIBLE);
+ else
+ holder.account_search_title.setVisibility(View.GONE);
holder.account_dn.setText(account.getDisplay_name());
holder.account_un.setText(String.format("@%s",account.getUsername()));
@@ -260,10 +268,15 @@ public class SearchListAdapter extends BaseAdapter {
v = layoutInflater.inflate(R.layout.drawer_tag, parent, false);
holder = new ViewHolderTag();
holder.tag_name = (TextView) v.findViewById(R.id.tag_name);
+ holder.tag_search_title = (TextView) v.findViewById(R.id.tag_search_title);
v.setTag(holder);
} else {
holder = (ViewHolderTag) v.getTag();
}
+ if( isFirstTypeItem(type, position) )
+ holder.tag_search_title.setVisibility(View.VISIBLE);
+ else
+ holder.tag_search_title.setVisibility(View.GONE);
holder.tag_name.setText(String.format("#%s",tag));
holder.tag_name.setPaintFlags(holder.tag_name.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
holder.tag_name.setOnClickListener(new View.OnClickListener() {
@@ -280,6 +293,15 @@ public class SearchListAdapter extends BaseAdapter {
}
}
+ private boolean isFirstTypeItem(int type, int position){
+ if( position == 0 && type == STATUS_TYPE)
+ return true;
+ else if( position == statuses.size() && type == ACCOUNT_TYPE )
+ return true;
+ else if( position == (statuses.size() + accounts.size()) && type == TAG_TYPE )
+ return true;
+ return false;
+ }
private class ViewHolderStatus {
TextView status_content;
@@ -289,6 +311,7 @@ public class SearchListAdapter extends BaseAdapter {
TextView status_toot_date;
TextView status_reblog_user;
LinearLayout main_container;
+ TextView status_search_title;
}
@@ -300,9 +323,11 @@ public class SearchListAdapter extends BaseAdapter {
TextView account_sc;
TextView account_fgc;
TextView account_frc;
+ TextView account_search_title;
}
private class ViewHolderTag {
TextView tag_name;
+ TextView tag_search_title;
}
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/drawer_account_main_search.xml b/app/src/main/res/layout/drawer_account_main_search.xml
index 15662ad32..0e996f607 100644
--- a/app/src/main/res/layout/drawer_account_main_search.xml
+++ b/app/src/main/res/layout/drawer_account_main_search.xml
@@ -17,7 +17,6 @@
-->
+ android:orientation="vertical">
+
-
-
-
+ android:orientation="horizontal">
-
+
+
+
+
+ android:orientation="horizontal">
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:orientation="horizontal"
+ android:baselineAligned="false">
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/drawer_status_main_search.xml b/app/src/main/res/layout/drawer_status_main_search.xml
index 7d74d4566..1439ef989 100644
--- a/app/src/main/res/layout/drawer_status_main_search.xml
+++ b/app/src/main/res/layout/drawer_status_main_search.xml
@@ -25,65 +25,87 @@
android:paddingRight="@dimen/drawer_padding"
android:layout_marginTop="5dp"
android:id="@+id/main_container"
- android:orientation="horizontal">
-
+ android:orientation="vertical">
+
+ android:orientation="horizontal">
+
-
+ android:layout_marginStart="5dp"
+ android:layout_marginLeft="5dp"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+
+
+
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/drawer_tag.xml b/app/src/main/res/layout/drawer_tag.xml
index a9eede1e2..b23a35db9 100644
--- a/app/src/main/res/layout/drawer_tag.xml
+++ b/app/src/main/res/layout/drawer_tag.xml
@@ -18,12 +18,30 @@
+ android:orientation="vertical">
+
Email
Comptes
Pouets
+ Tags
Jeton
Authentification en deux étapes ?
Autre instance que mastodon.etalab.gouv.fr ?