mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-12-23 15:38:47 -05:00
Bug fix: menu didn't work on Android 2.x due to search widget
This commit is contained in:
parent
c289346538
commit
58a6e63be0
@ -194,12 +194,13 @@ namespace keepass2android
|
||||
|
||||
MenuInflater inflater = MenuInflater;
|
||||
inflater.Inflate(Resource.Menu.group, menu);
|
||||
|
||||
var searchManager = (SearchManager)GetSystemService(Context.SearchService);
|
||||
var searchView = (SearchView)menu.FindItem(Resource.Id.menu_search).ActionView;
|
||||
if (Util.HasActionBar(this))
|
||||
{
|
||||
var searchManager = (SearchManager) GetSystemService(Context.SearchService);
|
||||
var searchView = (SearchView) menu.FindItem(Resource.Id.menu_search).ActionView;
|
||||
|
||||
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -30,11 +30,7 @@
|
||||
android:showAsAction="ifRoom"
|
||||
android:actionViewClass="android.widget.SearchView"
|
||||
/>
|
||||
<item android:id="@+id/menu_search_advanced"
|
||||
android:icon="@android:drawable/ic_menu_search"
|
||||
android:title="@string/menu_search_advanced"
|
||||
android:showAsAction="never"
|
||||
/>
|
||||
|
||||
<item android:id="@+id/menu_app_settings"
|
||||
android:icon="@android:drawable/ic_menu_preferences"
|
||||
android:title="@string/menu_app_settings"
|
||||
|
Loading…
Reference in New Issue
Block a user