Hello i am using android 3.0 search widget(not the search mode), the problem is i need to pass some parameters along with the search word.
Android isn't calling any of these
searchManager.setOnDismissListener( new OnDismissListener() {
@Override
public void onDismiss() {
// TODO Auto-generated method stub
Log.v(MyApp.TAG, "on dismiss search");
}
});
searchManager.setOnCancelListener( new OnCancelListener() {
@Override
public void onCancel() {
// TODO Auto-generated method stub
Log.v(MyApp.TAG, "on dismiss cancel");
}
});
@Override
public boolean onSearchRequested() {
Bundle appData = new Bundle();
appData.putLong("listino_id", this.listino_id);
this.startSearch(null, true, appData, false);
return true;
// return super.onSearchRequested();
}
I need my activity to NOT be singleOnTop, here is my AndroidManifest.xml
<activity android:name=".activity.ListinoProdottiActivity" android:windowSoftInputMode="stateHidden">
<!-- Receives the search request. -->
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<!-- No category needed, because the Intent will specify this class component-->
</intent-filter>
<!-- enable the base activity to send searches to itself -->
<meta-data android:name="android.app.default_searchable"
android:value=".activity.ListinoProdottiActivity" />
<!-- Points to searchable meta data. -->
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
Here is my searchable.xml
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
/>