覆盖长preSS的搜索按钮,显示对话框 [英] Override Long Press Search button to show dialog

查看:76
本文介绍了覆盖长preSS的搜索按钮,显示对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我搜索了计算器和网络上各种网站的问题/解答。
从我所看到的,人们似乎认为这是不可能覆盖长preSS的搜索按钮,开始一个活动/对话框。因为handcent,市场应用程序使用长preSS搜索按钮开始quickcompose活动这是不可能的。
可悲的是,当我指定

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

<接收器的android:启用=真正的机器人。musicdialogNAME =>
        <意向过滤器的android:优先=1>
            <行动机器人:名字=android.intent.action.ACTION_SEARCH_LONG_ $ P $干燥综合征/>
        < /意图过滤器>
    < /接收器>

< 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>

我也试过&LT;行动机器人:名字=android.intent.action.SEARCH_LONG_ $ P $干燥综合征/>

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

有人认为从长远preSS的搜索按钮使用global_search但我不希望覆盖该功能。

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

简单的问题。我如何重写龙preSS的搜索按钮,显示对话框?

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

推荐答案

ACTION_SEARCH_LONG_ $ P $干燥综合征是一个活动的行动。你使用它的&LT;活性GT; &LT;意向滤光器&gt; ,不与&lt;接收&GT;

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

这篇关于覆盖长preSS的搜索按钮,显示对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆