Invoke Activity using physical Search button

by fr4gus » Wed, 15 Dec 2010 01:20:44 GMT

Sponsored Links
 Hi All,

I was looking at Search Framework documentation and it looks pretty

I also was looking at Twitter and Facebook applications for Android
and I notice both applications handle search button different. When
user press search button, it will immediately display an Activity,
instead of the regular search box dialog.

I would like to start a Search activity in the same way as Twitter and
Facebook, since I would like to offer filter options.

Any ideas how this could be done?




Re: Invoke Activity using physical Search button

by Mark Murphy » Wed, 15 Dec 2010 02:16:00 GMT

 Override onSearchRequested() and do whatever you want, IIRC.

Mark Murphy (a Commons Guy)  |  | 

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9


Sponsored Links

Other Threads

1. Streetview not working in 1.6?

Dear all
The streetview snippet below, which was working in prior version is
crashing in Android SDK 1.6. The dev platform is Eclipse on Ubuntu.
I've made minor changes to the URI based on the information at


import android.content.Intent;
import android.os.Bundle;

public class Street extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse


2. "unknown socket error " Is anyone know this error??


I think the problem was about the url convention, Here is my example:

*  private static final String URL = "";

you see full source code of my example from Exam: Web Service Client for
Android SDK 
Note: any result, please let me know too. :)

Chaiyasit T.*


3. Question about built-in content providers

4. Audio Playback while Recording... ------- attemp playback while recording, cheat it! ----- error

5. Fwd: Device Driver Development for Android

6. BaseAdapter getView() gets called 3x per item

7. Managing background uploads