Search bug fixing

This commit is contained in:
AlexVallat 2013-08-16 18:46:05 +01:00
parent bb0827ea51
commit 76af17cfa0
2 changed files with 4 additions and 4 deletions

View File

@ -29,6 +29,7 @@ using Android.Content.PM;
namespace keepass2android
{
[Activity (Label = "@string/kp2a_findUrl", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden, Theme="@style/Base")]
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
public class ShareUrlResults : GroupBaseActivity
{

View File

@ -31,11 +31,10 @@ namespace keepass2android.search
/// </summary>
[Activity (Label = "@string/app_name", Theme="@style/NoTitleBar", LaunchMode=Android.Content.PM.LaunchMode.SingleTop)]
[MetaData("android.app.searchable",Resource=AppNames.Searchable)]
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
public class SearchResults : GroupBaseActivity
{
private Database _db;
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
@ -80,7 +79,7 @@ namespace keepass2android.search
private void Query (SearchParameters searchParams)
{
try {
Group = _db.Search (searchParams, null);
Group = App.Kp2a.GetDb().Search (searchParams, null);
} catch (Exception e) {
Toast.MakeText(this,e.Message, ToastLength.Long).Show();
Finish();