开发者

Override Long Press Search button to show dialog

Ok, I'开发者_如何学运维ve searched the questions/answers on stackoverflow and various sites around the web. From what I've seen, people seem to think that it is impossible to override the long press search button to start an activity/dialog. This cannot be possible since handcent, a market app uses the long press search button to start a quickcompose activity. Sadly, when I specify

< receiver android:enabled="true" android:name=".musicdialog" > < intent-filter android:priority="1"> < action android:name="android.intent.action.ACTION_SEARCH_LONG_PRESS" /> < /intent-filter> < /receiver>

I've also tried < action android:name="android.intent.action.SEARCH_LONG_PRESS" />

some people have thought the long press search button uses global_search but I don't want to override that functionality.

Simple question. How do I Override Long Press Search button to show dialog?


ACTION_SEARCH_LONG_PRESS is an activity action. You use it with an <activity> in its <intent-filter>, not with a <receiver>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜