0

I want to create an Activity on the top of which there will be a Search Bar, and on the basis of the search I will query the database and show the result on the same Activity below. I might choose any kind of layout for showing those results. I am thinking of creating a Canvas to show results in formatted manner (like we see in Google Play Store app).

I have also searched some posts but this is not my requirement.

  1. http://developer.android.com/guide/topics/search/search-dialog.html
  2. Android Search Interface not submitting query
  3. problems with search interface in android app
  4. http://matthias.jimdo.com/2011/06/06/how-to-add-search-functionality-to-your-android-application/

How can I implement what I actually want to:

############Activity##############

@@Search bar here................@

-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
-------------Result Here----------
Community
  • 1
  • 1
Master
  • 2,945
  • 5
  • 34
  • 65
  • There's nothing stopping you from hiding the `ActionBar`, putting your search bar at the top and a content layout(whatever you want) below that search bar. – user Feb 09 '14 at 17:00
  • Why would you want to use a `Canvas` for displaying searchresults? – Darwind Feb 09 '14 at 17:00
  • Might be it is I was looking for. – Master Feb 09 '14 at 17:03
  • @Darwind I will show text result in formatted manner. – Master Feb 09 '14 at 17:03
  • `Canvas` is for drawing things - I wouldn't recommend using a `Canvas` for displaying text results and pictures. Use a `ListView` with a custom `Layout` for every item instead. Or a `GridView` for tablets for instance. Don't start with drawing your own things - you'll hate yourself in the end! ;-) – Darwind Feb 09 '14 at 18:28
  • What do I need if I want to format text and want to display button on the screen. Like if someone will press the button then some action wil l be performed. – Master Feb 10 '14 at 05:16

0 Answers0