2

I have implemented a search dialog as is explained http://developer.android.com/guide/topics/search/index.html.

What I currently have is a search dialog that will search through all books on my app. What I want is a way to let the user search through all books or just one specific book. Is it possible to create a custom search dialog that will do this for me? What I've thought of doing is have the basic search dialog and once that search is executed, have a drop down of ways to filter the search. However, it would be nice to be able to select the filter before the search is executed.

Jim Blackler
  • 22,946
  • 12
  • 85
  • 101
Pzanno
  • 2,185
  • 2
  • 20
  • 23

1 Answers1

0

Typically the search in android applications are context sensitive. This means the app knows what the user wants to search for by looking at the current activity. In your example - perhaps if the users presses search while browsing all books the app will search through all books, while looking inside one book and pressing search will search inside that book?

The developers of android has made it hard to make such customizations. The rationale is that you don't want to press so many buttons - Just type your query. Compare with google search fore example that you probably like.

vidstige
  • 12,492
  • 9
  • 66
  • 110
  • I like the idea of context sensitive searches a lot. However, if you have the Twitter app, they have a way of customizing the search dialog before you actually make the search and I was wondering how to do that. – Pzanno May 30 '11 at 15:27
  • Looks like the Twitter app is using a custom activity instead of the search dialog to do their searches. http://stackoverflow.com/questions/3795800/searchbar-just-like-twitter-app-in-android – Pzanno May 30 '11 at 15:33