[mono-android] How to implement search functionality
dawson
balihaiconsultancy at fastmail.co.uk
Sun Jan 29 15:32:58 UTC 2012
I'm having difficulty getting the search functionality to work.
I have the following as a search activity
[Activity(Label = "Search")]
[IntentFilter(new[] { Intent.ActionSearch })]
[MetaData("android.app.searchable", Resource = "@xml/searchable")]
public class SearchActivity : ListActivity
{
....
and in an activity where I want the search to be activated from I have
[Activity(Label = "Test Search")]
[MetaData("android.app.default_searchable", Value =
"com.test.SearchActivity")]
public class TestSearchActivity : Activity,
Android.Views.View.IOnClickListener
{
...
I have included the searchable.xml file in the res/xml folder
Looking at the generated manifest it all looks as described in the google
android docs.
But when I press the search button or call OnSearchRequested, nothing
happens?
What am I doing wrong. Are there any samples anywhere?
This is targeting Android 2.2 btw.
Thanks, D
--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/How-to-implement-search-functionality-tp5439547p5439547.html
Sent from the Mono for Android mailing list archive at Nabble.com.
More information about the Monodroid
mailing list