Fix for search suggestions no longer visible (probably since Xamarin/Android tools update),

Manifest for 0.9.8
This commit is contained in:
Philipp Crocoll 2015-08-26 21:01:49 +02:00
parent f8835b0f66
commit 27ee770bbb
8 changed files with 42 additions and 22 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/search"
android:icon="@android:drawable/ic_menu_search"
android:title="Search"
android:showAsAction="ifRoom"
android:actionViewClass="android.widget.SearchView"
/>
</menu>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:searchMode="showSearchLabelAsBadge"
android:searchSuggestAuthority="App1.SearchProvider"
android:searchSuggestSelection=" ?"
android:searchSuggestThreshold="2"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSuggestIntentData="content://keepass2android.EntryActivity"
>
</searchable>

View File

@ -31,6 +31,8 @@ namespace keepass2android
{ {
[Activity (Label = "@string/app_name", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden , Theme="@style/NoTitleBar")] [Activity (Label = "@string/app_name", ConfigurationChanges=ConfigChanges.Orientation|ConfigChanges.KeyboardHidden , Theme="@style/NoTitleBar")]
[MetaData("android.app.default_searchable",Value="keepass2android.search.SearchResults")] [MetaData("android.app.default_searchable",Value="keepass2android.search.SearchResults")]
[IntentFilter(new string[]{"android.intent.action.SEARCH"})]
[MetaData("android.app.searchable",Resource=AppNames.Searchable)]
public class GroupActivity : GroupBaseActivity { public class GroupActivity : GroupBaseActivity {
public const int Uninit = -1; public const int Uninit = -1;

View File

@ -313,11 +313,11 @@ namespace keepass2android
inflater.Inflate(Resource.Menu.group, menu); inflater.Inflate(Resource.Menu.group, menu);
if (Util.HasActionBar(this)) if (Util.HasActionBar(this))
{ {
var searchManager = (SearchManager) GetSystemService(SearchService); var searchManager = (SearchManager)GetSystemService (Context.SearchService);
IMenuItem searchItem = menu.FindItem(Resource.Id.menu_search); IMenuItem searchItem = menu.FindItem(Resource.Id.menu_search);
var searchView = (SearchView) searchItem.ActionView; var searchView = (SearchView) searchItem.ActionView;
searchView.SetSearchableInfo(searchManager.GetSearchableInfo(ComponentName)); searchView.SetSearchableInfo (searchManager.GetSearchableInfo (ComponentName));
searchView.SetOnSuggestionListener(new SuggestionListener(searchView.SuggestionsAdapter, this, searchItem)); searchView.SetOnSuggestionListener(new SuggestionListener(searchView.SuggestionsAdapter, this, searchItem));
searchView.SetOnQueryTextListener(new OnQueryTextListener(this)); searchView.SetOnQueryTextListener(new OnQueryTextListener(this));
} }

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="56" android:versionCode="58"
android:versionName="0.9.8 preview 1" android:versionName="0.9.8"
package="keepass2android.keepass2android" package="keepass2android.keepass2android"
android:installLocation="auto"> android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" /> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />

View File

@ -540,7 +540,7 @@
* Changed password font\n * Changed password font\n
* Allow to change Dropbox account\n * Allow to change Dropbox account\n
* Fixed bug: Now remembering OTP password\n * Fixed bug: Now remembering OTP password\n
* more to come\n * Note: I have promised Material Design for this release. I am constantly working on it, but it needs a bit more time. Sorry! \n
</string> </string>
<string name="ChangeLog_0_9_7b"> <string name="ChangeLog_0_9_7b">

View File

@ -36,26 +36,24 @@
</CustomCommands> </CustomCommands>
</CustomCommands> </CustomCommands>
<EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk>
<AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis> <AndroidLinkSkip>
<AndroidUseSharedRuntime>True</AndroidUseSharedRuntime> </AndroidLinkSkip>
<AndroidLinkSkip /> <AndroidStoreUncompressedFileExtensions>
<BundleAssemblies>False</BundleAssemblies> </AndroidStoreUncompressedFileExtensions>
<AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi> <JavaOptions>
<AndroidStoreUncompressedFileExtensions /> </JavaOptions>
<MandroidI18n /> <MonoDroidExtraArgs>
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize> </MonoDroidExtraArgs>
<JavaOptions />
<MonoDroidExtraArgs />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType> <DebugType>full</DebugType>
<Optimize>True</Optimize> <Optimize>True</Optimize>
<OutputPath>bin\Release</OutputPath> <OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime>
<ConsolePause>False</ConsolePause> <ConsolePause>False</ConsolePause>
<AndroidSupportedAbis>armeabi,armeabi-v7a</AndroidSupportedAbis> <AndroidSupportedAbis>armeabi;armeabi-v7a</AndroidSupportedAbis>
<CustomCommands> <CustomCommands>
<CustomCommands> <CustomCommands>
<Command type="BeforeBuild" command="UseManifestNet.bat" /> <Command type="BeforeBuild" command="UseManifestNet.bat" />
@ -65,10 +63,6 @@
<DefineConstants>RELEASE</DefineConstants> <DefineConstants>RELEASE</DefineConstants>
<AndroidLinkSkip>System.Core%3b</AndroidLinkSkip> <AndroidLinkSkip>System.Core%3b</AndroidLinkSkip>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AndroidStoreUncompressedFileExtensions>
</AndroidStoreUncompressedFileExtensions>
<JavaOptions>
</JavaOptions>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseNoNet|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseNoNet|AnyCPU' ">
<DebugType>none</DebugType> <DebugType>none</DebugType>

View File

@ -33,7 +33,7 @@ using System.Collections.Generic;
namespace keepass2android.search namespace keepass2android.search
{ {
[ContentProvider(new [] { SearchProvider.Authority })] [ContentProvider(new [] { SearchProvider.Authority}, Exported=false )]
public class SearchProvider : ContentProvider public class SearchProvider : ContentProvider
{ {
private enum UriMatches private enum UriMatches