2010-12-20 90 views

回答

0

这里是 '搜索' 按钮,该解决方案:

<intent-filter> 
      <action android:name="android.intent.action.SEARCH_LONG_PRESS" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
</intent-filter> 
0

只是为了存档:

这(单独)没有帮助:

<uses-permission android:name="android.permission.GLOBAL_SEARCH" /> 

<activity android:name=".VoiceActions" 
      android:label="@string/app_name"> 
      <!-- This must be higher than the default priority (0), which 
     is what GoogleSearch uses. --> 
    <intent-filter android:priority="500"> 
     <action android:name="android.search.action.GLOBAL_SEARCH" /> 
     <category android:name="android.intent.category.DEFAULT" /> 
    </intent-filter> 


      <intent-filter> 
      <action android:name="android.intent.action.SEARCH" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 

     <meta-data android:name="android.app.searchable" 
      android:resource="@xml/searchable" /> 

    </activity> 

     <meta-data android:name="android.app.default_searchable" 
     android:value=".VoiceActions" /> 
</application>