Hi,
I am trying to implement two different searchable activities, one for
honeycomb(with search widget) and others for non-honeycomb(with search
dialog).
Manifest looks like:
<activity android:name=".activities.Search"
android:theme="@style/NoTitleTheme"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleTop">
android:enabled="@bool/disableForNonHoneycomb"
<intent-filter>
<action
android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"
android:value=".activities.Search"/>
</activity>
<activity android:name=".activities.SearchHoneycomb"
android:theme="@style/CustomTheme"
android:configChanges="orientation|keyboardHidden"
android:enabled="@bool/enableForNonHoneycomb"
android:launchMode="singleTop">
<intent-filter>
<action
android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="@xml/searchable"
android:value=".activities.SearchHoneycomb"/>
</activity>
And, I use following code to get the searchable configuration and set
up the search view in my activity.
SearchManager searchManager = (SearchManager)
getSystemService(Context.SEARCH_SERVICE);
_searchView = (SearchView)
mCustomView.findViewById(R.id.action_bar_searchwidget);
_searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
Problem is that when I use the search widget, it does not start the
SearchHoneycomb activity. How can I make this work?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en