Android local search
- by Aleksander O
Hi!
I'm trying to implement a local search in my activity. I've added an appropriate intent filter and metadata tag to manifest file but if I click Search button it invokes standard android search box. What's my problem?
Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nixsolutions.invertigation.android.dataprovider"
android:versionCode="1"
android:versionName="1.0">
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:debuggable="true">
<provider
android:name="NoteProvider"
android:authorities="com.nixsolutions.investigation.android.NoteProvider">
</provider>
<activity
android:name="NotesList">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action
android:name="android.intent.action.SEARCH" />
<category
android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
</application>
<uses-sdk
android:minSdkVersion="7" />
</manifest>
searchable.xml:
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="Custom search"
android:hint="Custom hint"
android:searchMode="showSearchLabelAsBadge"
/>