我想我的主要活动将是搜索也,但是当我改变的manifest.xml到Android:如何将活动声明为主要和可搜索的?
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- declare the default searchable Activity for the whole app -->
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
它不能发现的主要活动和应用程序不运行。 有什么想法? 使用与可搜索相同的活动不是最佳做法吗? 谢谢, 阿利萨
注意此解决方案:您的活动不会自动启动。我以前喜欢你,但Maragues回答救了我,并没有给出任何问题 – 2012-01-09 08:30:17