From ec83212c0d30a21149f3e5d2acc57652ba5999e3 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 9 Jan 2016 17:48:24 +0100 Subject: [PATCH] Close search when opening settings to prevent keyboard from popping up --- app/app.iml | 1 + app/src/main/java/eu/faircode/netguard/ActivityMain.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/app.iml b/app/app.iml index 693137fa..de5fe5b4 100644 --- a/app/app.iml +++ b/app/app.iml @@ -98,6 +98,7 @@ + diff --git a/app/src/main/java/eu/faircode/netguard/ActivityMain.java b/app/src/main/java/eu/faircode/netguard/ActivityMain.java index b139b3c6..a419ed7a 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityMain.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityMain.java @@ -42,7 +42,6 @@ import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.SearchView; import android.support.v7.widget.SwitchCompat; -import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.util.Log; import android.util.TypedValue; @@ -582,6 +581,8 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences return true; case R.id.menu_settings: + if (menuSearch != null) + MenuItemCompat.collapseActionView(menuSearch); startActivity(new Intent(this, ActivitySettings.class)); return true;