diff --git a/src/keepass2android/GroupBaseActivity.cs b/src/keepass2android/GroupBaseActivity.cs
index 17f959b5..e4c8d296 100644
--- a/src/keepass2android/GroupBaseActivity.cs
+++ b/src/keepass2android/GroupBaseActivity.cs
@@ -194,12 +194,13 @@ namespace keepass2android
MenuInflater inflater = MenuInflater;
inflater.Inflate(Resource.Menu.group, menu);
+ if (Util.HasActionBar(this))
+ {
+ var searchManager = (SearchManager) GetSystemService(Context.SearchService);
+ var searchView = (SearchView) menu.FindItem(Resource.Id.menu_search).ActionView;
- var searchManager = (SearchManager)GetSystemService(Context.SearchService);
- var searchView = (SearchView)menu.FindItem(Resource.Id.menu_search).ActionView;
-
- searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
-
+ searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
+ }
return true;
}
diff --git a/src/keepass2android/Resources/menu/group.xml b/src/keepass2android/Resources/menu/group.xml
index 4a516d20..26788479 100644
--- a/src/keepass2android/Resources/menu/group.xml
+++ b/src/keepass2android/Resources/menu/group.xml
@@ -30,11 +30,7 @@
android:showAsAction="ifRoom"
android:actionViewClass="android.widget.SearchView"
/>
-
+