mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-25 10:42:17 -05:00
Search bug fixing
This commit is contained in:
parent
bb0827ea51
commit
76af17cfa0
@ -28,7 +28,8 @@ using Android.Content.PM;
|
|||||||
|
|
||||||
namespace keepass2android
|
namespace keepass2android
|
||||||
{
|
{
|
||||||
[Activity (Label = "@string/kp2a_findUrl", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden, Theme="@style/Base")]
|
[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
|
public class ShareUrlResults : GroupBaseActivity
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -31,11 +31,10 @@ namespace keepass2android.search
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Activity (Label = "@string/app_name", Theme="@style/NoTitleBar", LaunchMode=Android.Content.PM.LaunchMode.SingleTop)]
|
[Activity (Label = "@string/app_name", Theme="@style/NoTitleBar", LaunchMode=Android.Content.PM.LaunchMode.SingleTop)]
|
||||||
[MetaData("android.app.searchable",Resource=AppNames.Searchable)]
|
[MetaData("android.app.searchable",Resource=AppNames.Searchable)]
|
||||||
|
[MetaData("android.app.default_searchable", Value = "keepass2android.search.SearchResults")]
|
||||||
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
|
[IntentFilter(new[]{Intent.ActionSearch}, Categories=new[]{Intent.CategoryDefault})]
|
||||||
public class SearchResults : GroupBaseActivity
|
public class SearchResults : GroupBaseActivity
|
||||||
{
|
{
|
||||||
private Database _db;
|
|
||||||
|
|
||||||
protected override void OnCreate (Bundle bundle)
|
protected override void OnCreate (Bundle bundle)
|
||||||
{
|
{
|
||||||
base.OnCreate (bundle);
|
base.OnCreate (bundle);
|
||||||
@ -80,7 +79,7 @@ namespace keepass2android.search
|
|||||||
private void Query (SearchParameters searchParams)
|
private void Query (SearchParameters searchParams)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Group = _db.Search (searchParams, null);
|
Group = App.Kp2a.GetDb().Search (searchParams, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Toast.MakeText(this,e.Message, ToastLength.Long).Show();
|
Toast.MakeText(this,e.Message, ToastLength.Long).Show();
|
||||||
Finish();
|
Finish();
|
||||||
|
Loading…
Reference in New Issue
Block a user