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. USB tethering option missing from settings view

Hi All,

I am using Android 2.2 (froyo) codebase. My kernel contains USB device
support and I have enabled rndis gadget driver support in the kernel
(2.6.32 based kernel).

My problem is I am not able to see USB tethering option in my settings
view under Wi-Fi Settings. Please let me know is there anything we
need to do to enable USB tethering option in Froyo.

When I checked logcat messages following relevant messages I got..
Part of logcat Message....
I/SystemServer( 1958): Bluetooth Service
W/bluedroid( 1958): open(/sys/class/rfkill/rfkill0/type) failed: No
such file or directory (2)
I/SystemServer( 1958): Device Policy
I/SystemServer( 1958): Status Bar
I/SystemServer( 1958): Clipboard Service
I/SystemServer( 1958): Input Method Service
I/InputManagerService( 1958): Enabled input methods:
I/SystemServer( 1958): NetStat Service
I/SystemServer( 1958): NetworkManagement Service
I/SystemServer( 1958): Connectivity Service
V/ConnectivityService( 1958): ConnectivityService starting up
D/ConnectivityService( 1958): getMobileDataEnabled returning true
V/ConnectivityService( 1958): Starting Wifi
Service.                                    <<<<<<<<<<<<<<<<<<<<
D/Tethering( 1958): Tethering
I/WifiService( 1958): WifiService starting up with Wi-Fi
disabled                 <<<<<<<<<<<<<<<<<<<
D/NetworkManagmentService( 1958): Registering observer
I/SystemServer( 1958): Throttle Service
D/ThrottleService( 1958): Starting ThrottleService
I/SystemServer( 1958): Accessibility Manager
I/SystemServer( 1958): Mount Service
I/SystemServer( 1958): Notification Manager
I/SystemServer( 1958): Device Storage Monitor
I/SystemServer( 1958): Location Manager
I/SystemServer( 1958): Search Service
I/SystemServer( 1958): DropBox Service
I/SystemServer( 1958): Wallpaper Service
D/VoldCmdListener( 1901): volume list
W/MountService( 1958): Duplicate state transition (removed -> removed)
D/VoldCmdListener( 1901): share status ums
I/SystemServer( 1958): Audio Service

Thanks and Regards,
Pankaj Dubey


2. Adding table row by inflating does not take table's settings

Hi all.

I have a table layout with a few predefined rows in it.
Each row has only two columns.

Now I need to dynamically add additional rows in it.

I have two problems:

1) When programmatically inflating, I cannot set the index of the
newly created row (I want it in place 'n')
2) After inflation, the inserted (actually appended) row doesn't
listen to parent table's stretch column property.

So here are my questions:

q1) Can I set the place where to insert the inflated row
programatically ?
q2) Why doesn't the new row inflate properly (the second column is not
shown because the first column doesn't contains a TextView with

In the end I need the first column to occupy 80% of the screen width,
and the second column remaining 20%.

q3) is that doable with programmatic row insertions ?




3. How can I hide views when the soft keyboard is up?

4. Are 3rd party app stores a good idea for free apps?

5. Another back button question... soft keyboard related

6. Fwd: Enlightenment needs NO ANNOUNCEMENT

7. Bold fonts creation from regular font file