From c27d170ab44d5d9cdc006552efbef55e8fd2dceb Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 9 Apr 2020 20:24:35 +0200 Subject: [PATCH] Fixed selecting search suggestion --- .../main/java/eu/faircode/email/FragmentDialogSearch.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java index 0e2e7dbe7d..4cbf1c9d0b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java @@ -79,6 +79,13 @@ public class FragmentDialogSearch extends FragmentDialogBase { } }); + adapter.setCursorToStringConverter(new SimpleCursorAdapter.CursorToStringConverter() { + @Override + public CharSequence convertToString(Cursor cursor) { + return cursor.getString(cursor.getColumnIndex("suggestion")); + } + }); + etQuery.setAdapter(adapter); ibInfo.setOnClickListener(new View.OnClickListener() {