Add search functionality
Stay organized with collections
Save and categorize content based on your preferences.
Android's built-in search features offer apps an easy way to provide a
consistent search experience for all users. There are two ways to implement search in your app,
depending on the version of Android that is running on the device. This documentation covers how
to add search with
SearchView
while maintaining
backward compatibility with older versions of Android by
using the system's default search dialog.
Lessons
- Set up the search interface
- Learn how to add a search interface to your app and how to configure an activity to handle
search queries.
- Store and search for data
- Learn a simple way to store and search for data in a SQLite virtual database table.
- Remain backward compatible
- Learn how to keep search features backward compatible with older devices.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-02-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-02-22 UTC."],[],[]]