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
cool  http://developer.android.com/guide/topics/search/index.html. 

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?

Thanks,

-f4

-- 



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)
 http://commonsware.com  |  http://github.com/commonsguy 
 http://commonsware.com/blog  |  http://twitter.com/commonsguy 

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

-- 


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
http://developer.android.com/guide/appendix/g-app-intents.html

TIA

s.b.
------------
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

public class Street extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse
 
("google.streetview:cbll=40.75859,-73.98509&cbp=1,,180,0&mz=1.0"));
                startActivity(myIntent);
    }
}

--~--~---------~--~----~------------~-------~--~----~

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

Hi,

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

*  private static final String URL = "
http://www.codemobiles.com/nusoap/samples/authen_ws.php";

you see full source code of my example from Exam: Web Service Client for
Android SDK 
Ver-1.1,1.5,1.6<%20%20private%20static%20final%20String%20URL%20=%20%22http://www.codemobiles.com/nusoap/samples/authen_ws.php%22;>
*
Note: any result, please let me know too. :)

Chaiyasit T.
www.codemobiles.com*
*








--~--~---------~--~----~------------~-------~--~----~

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