只需要在searchable配置文件中写入下面的代码,很简单:

<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer" >
</searchable>

注意:

一定要认真考虑是否语音搜索是否适合你的应用程序。要充分的测试你的语言识别,确保能够识别你的查询类型!切记,切记!

更多相关文章

  1. android触摸语音事件
  2. linux下如何为刚安装好的Eclipse在桌面建一个启动图标???(QtCreator
  3. [置顶] Android(安卓)怎么退出整个应用程序?
  4. 2、一、Introduction(入门):1、Application Fundamentals(应用程
  5. android中 layer-list和include的使用
  6. Android(安卓)获取泛型实际类型
  7. Windows下编译使用Android(安卓)NDK,调用SO文件
  8. android将图片转成字符串,再将字符串转成图片 (base64处理的字符
  9. Android插件化之ContentProvider

随机推荐

  1. Android开发环境配置简介
  2. Ubuntu 10.04下Android开发环境的搭建
  3. android 线程优先级设置
  4. 用于替代 Android 自带 Dialog 和 PopupW
  5. Android从零开始-Android工程的目录结构
  6. Android核心技术——Android入门-威哥_马
  7. android 在子线程中使用Toast等功能
  8. Android(安卓)数据存数---SQLite数据库
  9. 升级Android内置apk版本
  10. Android(安卓)7.0 FileProvider简单使用