Implementation of Search Dialog - android

I am developing an android app which requires search functionality.
My app contains action bar and I have search button on it. On click of search button, I want search dialog to appear on top and do some search for me.
I need help in implementing this.
I tried the Google I/O sched project, but its too complex for me.
Can anybody help me develop a simple search dialog.
Also, I want the search to have 2 search options.
I have 2 different lists containing different data. So, I want to make search on both these lists but separately.
Check out this twitter app, the search bar has 2 options, it can search from tweets or people, I want some thing like thatA.
Any help is appreciated.
Thanks

Just go through these two links they will give a basic idea of how to add a searching functionality in your application.The idea can then be extended to have search based on two buttons.
http://shapingclouds.com/2009/10/19/how-add-searchmanager-quick-search-to-your-android-application/
http://developer.android.com/guide/topics/search/search-dialog.html
After you have done with above two links go through these links.They will give you idea of Twitter application's search.You can then extend the idea to create your own search functionality.
http://www.vogella.de/blog/2010/02/15/twitter-android/
I hope this may help you.

Related

Implement QSB like suggestions in android app

I need to give a search box in my android app. As the user starts typing in the search text, I need to show him relevant suggestions. (As we see in the google-search widget on the home screen. If we see from the logs, com.android.quicksearchbox/.SearchActivity is started with android.search.action.GLOBAL_SEARCH intent and it searches in following: corpora:[web, apps, com.android.contacts/.activities.PeopleActivity]).
Only thing is I need the suggestions to be displayed from the web & my application DB.
Any idea how to implement this ? Do I need to implement my own SuggestionsProvider or can I directly use the native implementation? If so, how?
I think i figure it out myself.
Went through Searchable Dictionary code & QuickSearchBox code in android source.
Need two start 2 activities in a background thread. One will search for the search-term in my DB & other will search the same in Google. All the results will be seen in the suggestion list.
Google Suggest API provides suggestions as the user enters the text.

How to build Quick Action Bar like in Contacts application for Android?

I am interested in doing my application similar to the contact apps where on click on the image pops up a small quick action menu(Not sure of the name). In that you get option to call them, email them or do similar activity. I too have a list view with a image in it. On click of the image I want to show a similar small action bar that will give quick links to users to navigate to my next activity. Please let me know how to do this. A quick sample will be good. Thank you for your time and help.
IMO GreenDroid is a full-featured UI framework, but if you just want the QuickAction in your apps, you can use this http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Just feel this way is simpler :D
The GreenDroid QuickAction is what you are looking for I think https://github.com/cyrilmottier/GreenDroid

How to create custom search box

I am doing search_bar in my android application, for that i created edit text and button. it will search data whatever we edited in edit text.But giving more attraction to my search_bar i have a idea to include android default search box to my application. i am not sure about the possibility of including default search bar to my application. I searched in google, but i cant get any proper guidance. if any of you guys having idea about this issue please guide me..
If you want to make a custom search bar, look at the Dictionary example given in the Android developer guide. I am having trouble myself modifying the example, but it was helpful starting point to create my own customizable search

Android - custom quick search box

If you using Twitter for Android you can see that clicking on phone's hard search button brings fully customized quick search-like control. Now I'm not saying that it IS stock Android customized quick search but how would one build something like that?
I want quick search box behavior but I also want add some additional selectors (think Firefox search where on the left there's a dropdown to select search engine)
I suspect that clicking search brings another activity that just looks like a quick search. Now I know how to trigger search activity from the quick search but how to intercept quick box call and display your activity instead?
Where would I start with something like that? Any hints and pointers will be greatly appreciated
With no screenshot, I can't help terribly much, since I don't use the official Twitter app (I'm a Seesmic guy), so I don't quite know what you are talking about.
You can override onSearchRequested() to get control when the user requests a search in your activity. Return true to say you're handling the search yourself. Along the way, pop up whatever you like to allow the user to do a search.

share feature of menu in android application

i asked so many question regarding my title but i could not get my proper answer till yet.I need to implement androd's menu feature in my application ie when we goes to gallery in android phone, when we press menu than it comes with lots of option like share...etc.My question is can i implement same menu feature in my application? It is possible or not?
Thanks
To implement a "Share" feature, all you need to do is use createChooser() and an ACTION_SEND Intent.
Here is a blog post covering the technique.
If I am understanding your question you want to know if you can duplicate the feature of tapping on the menu button on the phone and having it pull up an options menu that you can then share via, gmail or some other posting medium?
If this is correct then I would have to say I would assume that you could duplicate this feature.
In short YES!
If you are wondering how you are to do this then I would start at here http://developer.android.com/guide/topics/ui/menus.html
Droidnova .com (I posted it like this because as a new user I can only post one link) also has a good little how to on menu's.
I would also like to add that this is my first time posting on stackoverflow so please let me know if this was a good post or what I should do next time.
Thanks,
Bactos

Categories

Resources