intermediary (still search suggestions)

This commit is contained in:
Philipp Crocoll 2015-09-01 06:13:55 +02:00
parent 59014bde22
commit 1f62797b78
2 changed files with 26 additions and 21 deletions

View File

@ -95,7 +95,7 @@ namespace keepass2android
{
get { return App.Kp2a.GetDb().CanWrite && ((this.Group.ParentGroup != null) || App.Kp2a.GetDb().DatabaseFormat.CanHaveEntriesInRootGroup); }
}
/*
public override bool OnCreateOptionsMenu(IMenu menu)
{
// Inflate the menu; this adds items to the action bar if it is present.
@ -117,24 +117,10 @@ namespace keepass2android
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
// searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default
var search_src_text = searchView.FindViewById(keepass2android.Resource.Id.search_src_text);
try
{
var autoCompleteTextView = search_src_text.JavaCast< Android.Support.V7.Widget.SearchView.SearchAutoComplete>();
if (autoCompleteTextView != null) {
autoCompleteTextView.SetDropDownBackgroundResource(keepass2android.Resource.Drawable.search_dropdown_light);
}
}
catch (Exception e)
{
Android.Util.Log.Debug ("e", e.ToString());
}
return base.OnCreateOptionsMenu(menu);
}
*/
protected override void OnCreate (Bundle savedInstanceState)
{
base.OnCreate (savedInstanceState);

View File

@ -392,10 +392,9 @@ namespace keepass2android
return true;
}
}
/*
public override bool OnCreateOptionsMenu(IMenu menu) {
return base.OnCreateOptionsMenu(menu);
MenuInflater inflater = MenuInflater;
inflater.Inflate(Resource.Menu.group, menu);
var searchManager = (SearchManager) GetSystemService(SearchService);
@ -406,6 +405,23 @@ namespace keepass2android
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName));
searchView.SetOnSuggestionListener(new SuggestionListener(searchView.SuggestionsAdapter, this, searchItem));
searchView.SetOnQueryTextListener(new OnQueryTextListener(this));
/*
var search_src_text = searchView.FindViewById(Resource.Id.search_src_text);
try
{
var autoCompleteTextView = search_src_text.JavaCast< Android.Support.V7.Widget.SearchView.SearchAutoComplete>();
if (autoCompleteTextView != null) {
autoCompleteTextView.SetDropDownBackgroundResource(keepass2android.Resource.Drawable.search_dropdown_light);
}
}
catch (Exception e)
{
Android.Util.Log.Debug ("e", e.ToString());
}*/
var item = menu.FindItem(Resource.Id.menu_sync);
if (item != null)
@ -415,9 +431,12 @@ namespace keepass2android
else
item.SetVisible(true);
}
//return true;
return base.OnCreateOptionsMenu(menu);
}
*/