[android-developers] search suggestions

2011-06-26 Thread Ralph Bergmann

Hi,


I followed the description in this article to implement the search 
system, everything works fine.

http://developer.android.com/guide/topics/search/index.html

But I dont understand the the user selects a suggestion behavior.

The user enter a search string in the textfield and the system displays 
the list of suggestions provided by the Cursor.


But when the user select a row from the (suggestions) table my search 
activity gets the string from the text field as query and not the string 
from the selected row. And now my search activity shows another table 
with the same entries.


What goes wrong?


Ralph

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] search suggestions

2011-06-26 Thread Ralph Bergmann

Am 26.06.11 17:26, schrieb Ralph Bergmann:

What goes wrong?


I found it, I forgot

android:searchSuggestIntentAction=android.intent.action.VIEW
android:searchSuggestIntentData=content://xxx

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Search suggestions for a SearchView Widget

2011-03-15 Thread Tom
I've added a SearchView to the ActionBar like is done here:
http://developer.android.com/guide/topics/ui/actionbar.html#ActionView
and am running into a few issues. First, is there any mechanism for
search suggestions, like with the standard search dialog (can I just
hook up a Content Provider), or do  I need to create my own view that
I manually update in the onQueryTextChanged listener?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Search suggestions causing inconsistent behavior in application after triggered from Quick Search Bar

2010-06-11 Thread BillyK
I'm running into an issue with the Quick Search Bar that I'm hoping
someone can help me with.

My application includes a Searchable activity used to provide search
behavior within my application.  That search activity is designed to
trigger a separate Intent when the search item is clicked on so as to
cause a different Activity to handle the viewing.  When used within
the application, the search behavior works perfectly every time.

My application also includes a ContentProvider used to provide search
suggestions and is also configured to allow use in the Quick Search
Bar.  When used within the application itself, use of the search
suggestions works fine every time it is used.  When triggered from the
QSB, the initial search suggestion brings up the viewing activity just
as it should.  After that point, however, any use of the search
suggestions from within the application (i.e. bringing up the search
and selecting a search suggestion) fails to trigger the viewing
application.  In fact, I've put debug statements in every single
onXXX() method within the Searchable activity and I never see any of
them get triggered.  On the flip side, when I trigger a standard
search at that same point (i.e. enter a query string and hit enter,
rather than navigating to a search suggestion), the search dialog
comes up, as expected, and selecting an item from that list
successfully triggers my application.

I'm currently at a loss trying to determine why this would be
occurring.  Any ideas

As as some additional information, my manifest contains the following
in regards to the searchable activity
(.activity.SearchableActivity), the suggestions provider
(.content.TestSuggestionProvider) and the activity used to display
the content (.activity.TestDisplayActivity):

activity
android:name=.activity.TestDisplayActivity
android:label=@string/app_name
android:launchMode=singleTask
android:finishOnTaskLaunch=true
android:theme=@android:style/Theme.NoTitleBar.Fullscreen
android:screenOrientation=landscape
android:configChanges=orientation|keyboardHidden
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
meta-data android:name=android.app.default_searchable
android:value=.activity.SearchableActivity /
/activity

activity
android:name=.activity.SearchableActivity
android:launchMode=singleTop
android:theme=@android:style/
Theme.NoTitleBar.Fullscreen
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

provider
android:name=.content.TestSuggestionProvider
android:authorities=com.test.provider.suggest
android:syncable=false
/

And the following is the XML used to further define the settings of
the searchable activity:

searchable xmlns:android=http://schemas.android.com/apk/res/
android
android:label=@string/search_app_label
android:hint=@string/search_app_hint
android:searchSettingsDescription=@string/
search_app_settings_description
android:includeInGlobalSearch=true
android:voiceSearchMode=showVoiceSearchButton|
launchRecognizer
android:searchSuggestAuthority=com.test.provider.suggest
 
android:searchSuggestIntentAction=android.intent.action.VIEW
/searchable

Any thoughts?  At the moment I'm at a complete loss…

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Search Suggestions/Autocomplete OnClick Behavior

2010-03-17 Thread SurtaX
I've implemented a search suggestion which works fine.

I've used the onSearchRequested() method to make it work as well as
the following XML:

searchable xmlns:android=http://schemas.android.com/apk/res/
android
android:label=@string/search_label
android:hint=@string/search_hint
android:includeInGlobalSearch=true
android:searchSuggestAuthority=authority
android:searchMode=queryRewriteFromData
android:searchSuggestIntentAction=android.intent.action.SEARCH
/searchable

However I cannot seem to dictate the behavior of the onClick function.
When a suggestion is clicked, it fires off the intent immediately. Is
there a way for it to instead of firing off the intent immediately,
simply copy and paste the suggestion as part of the search string?

Eg. when typing in J,o,h the suggestion John comes up. When I click
John can it copy that text into the search bar instead of
immediately processing the search with John?

I'm assuming theres a simple configuration which I cant seem to find.
I dont want to go extensively into catching the fired of intent and re-
processing etc

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en