From 47b18d7e9b3273030afaf6fb233af62b29ab5cbe Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 12 Jun 2020 19:47:37 +0200 Subject: [PATCH] Fixes --- .../faircode/email/FragmentDialogSearch.java | 18 ++++++++++++++++++ app/src/main/res/layout/dialog_search.xml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java index 1eb13d6282..658141be54 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogSearch.java @@ -15,6 +15,7 @@ import android.view.View; import android.view.WindowManager; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; +import android.widget.AdapterView; import android.widget.AutoCompleteTextView; import android.widget.Button; import android.widget.CheckBox; @@ -196,6 +197,23 @@ public class FragmentDialogSearch extends FragmentDialogBase { } }); + spMessageSize.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + parent.post(new Runnable() { + @Override + public void run() { + parent.requestFocusFromTouch(); + } + }); + } + + @Override + public void onNothingSelected(AdapterView parent) { + // Do nothing + } + }); + btnAfter.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/dialog_search.xml b/app/src/main/res/layout/dialog_search.xml index 7e9ada68d9..98dfa8291f 100644 --- a/app/src/main/res/layout/dialog_search.xml +++ b/app/src/main/res/layout/dialog_search.xml @@ -371,7 +371,7 @@ app:constraint_referenced_ids=" cbSearchIndex,tvSearchIndexHint,cbSenders,cbRecipients,cbSubject,cbKeywords,cbMessage,tvSearchTextHint, tvAnd,cbUnseen,cbFlagged,cbHidden,cbEncrypted,cbAttachments, - tvMessageSize,spMessageSize, + tvMessageSize,spMessageSize,tvSizeHint, btnAfter,btnBefore,tvBefore,tvAfter" /> \ No newline at end of file