💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
> 编写:[Lin-H](https://github.com/Lin-H) - 原文:[http://developer.android.com/training/search/index.html](http://developer.android.com/training/search/index.html) Android的内置搜索功能,能够在app中方便地为所有用户提供一个统一的搜索体验。根据设备所运行的Android版本,有两种方式可以在你的app中实现搜索。本节课程涵盖如何像Android 3.0中介绍的那样用[SearchView](http://developer.android.com/reference/android/widget/SearchView.html)添加搜索,使用系统提供的默认搜索框来向下兼容旧版本Android。 ### Lessons - [建立搜索界面](#) 学习如何向你的app中添加搜索界面,如何设置[activity](# "An activity represents a single screen with a user interface.")去处理搜索请求 - [保存并搜索数据](#) 学习在SQLite虚拟数据库表中用简单的方法储存和搜索数据 - [保持向下兼容](#) 通过使用搜索功能来学习如何向下兼容旧版本设备