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. Content Provider in separated project

Hi,

I've following problem. I've created 2 projects. One with content
provider. Second with client activity using this provider.

I've set project references in eclipse. Compliation completes
succesfuly. Problem is at runtime.

Provider.CONTENT_URI as well as other static public fields are not
resolved at runtime.

How to solve this problem?


Thanks, in advance

-- 

2. Importing in aidl file

I need a aidl file defining:

ArrayList<Foo> getFoo();

I import ArrayList package and Foo with

import java.util.ArrayList;
import com.xyz.fooPackage;

But eclipse keeps saying that can't find the importing class. Would
anybody help me? Thank you!

-- 

3. splash screen through activity

4. How can i record only incoming call audio stream

5. wifi on eclair

6. start activity without mention in androidmanifestfile

7. How to connect my G1 to my MacBook Pro via Blue Tooth